summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/IMessageWithEvents.cs
blob: 965b07406c0d7a8a3363e206204b89138bc92235 (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="Outercurve Foundation">
//     Copyright (c) Outercurve Foundation. 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();
	}
}