summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/IStreamSerializingDataBag.cs
blob: 16fed678a132bba08bd41b4a257d3811a825f8b8 (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
26
27
//-----------------------------------------------------------------------
// <copyright file="IStreamSerializingDataBag.cs" company="Outercurve Foundation">
//     Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Messaging {
	using System;
	using System.IO;

	/// <summary>
	/// An interface implemented by <see cref="DataBag"/>-derived types that support binary serialization.
	/// </summary>
	internal interface IStreamSerializingDataBag {
		/// <summary>
		/// Serializes the instance to the specified stream.
		/// </summary>
		/// <param name="stream">The stream.</param>
		void Serialize(Stream stream);

		/// <summary>
		/// Initializes the fields on this instance from the specified stream.
		/// </summary>
		/// <param name="stream">The stream.</param>
		void Deserialize(Stream stream);
	}
}