2 // System.Runtime.Serialization.ISerializationSurrogate
\r
5 // David Dawkins (david@dawkins.st)
\r
11 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
\r
13 // Permission is hereby granted, free of charge, to any person obtaining
\r
14 // a copy of this software and associated documentation files (the
\r
15 // "Software"), to deal in the Software without restriction, including
\r
16 // without limitation the rights to use, copy, modify, merge, publish,
\r
17 // distribute, sublicense, and/or sell copies of the Software, and to
\r
18 // permit persons to whom the Software is furnished to do so, subject to
\r
19 // the following conditions:
\r
21 // The above copyright notice and this permission notice shall be
\r
22 // included in all copies or substantial portions of the Software.
\r
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
25 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
26 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
27 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
\r
28 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
\r
29 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
\r
30 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
33 namespace System.Runtime.Serialization {
\r
36 /// Interface for serialization surrogates</summary>
\r
37 public interface ISerializationSurrogate {
\r
40 /// Get the SerializationInfo necessary to serialize
\r
41 /// the specified object </summary>
\r
42 /// <param name="obj">Object to be serialized</param>
\r
43 /// <param name="info">SerializationInfo to be populated</param>
\r
44 /// <param name="context">Destination for serialization</param>
\r
47 SerializationInfo info,
\r
48 StreamingContext context
\r
52 /// Populate an object using the specified SerializationInfo </summary>
\r
53 /// <param name="obj">Object to be populated</param>
\r
54 /// <param name="info">Data used for populating object</param>
\r
55 /// <param name="context">Source for deserialization of object</param>
\r
56 /// <param name="selector>Starting point for searching for compatible surrogates</param>
\r
57 /// <returns>The deserialized object</returns>
\r
58 object SetObjectData(
\r
60 SerializationInfo info,
\r
61 StreamingContext context,
\r
62 ISurrogateSelector selector
\r