summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/IMessageWithEvents.cs
blob: 51e00fccc1ba9ed263dfb446f6eb7f7515c1d87f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//-----------------------------------------------------------------------
// <copyright file="IMessageWithEvents.cs" company="Andrew Arnott">
//     Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Messaging {
	/// <summary>
	/// An interface that messages wishing to perform custom serialization/deserialization
	/// may implement to be notified of <see cref="Channel"/> events.
	/// </summary>
	internal interface IMessageWithEvents : IMessage {
		/// <summary>
		/// Called when the message is about to be transmitted,
		/// before it passes through the channel binding elements.
		/// </summary>
		void OnSending();

		/// <summary>
		/// Called when the message has been received, 
		/// after it passes through the channel binding elements.
		/// </summary>
		void OnReceiving();
	}
}