New file (ISurrogateSelector.cs)
[mono.git] / mcs / class / corlib / System.Runtime.Serialization / ISurrogateSelector.cs
1 //\r
2 // System.Runtime.Serialization.ISurrogateSelector\r
3 //\r
4 // Author:\r
5 //   David Dawkins (david@dawkins.st)\r
6 //\r
7 // (C) David Dawkins\r
8 //\r
9 \r
10 namespace System.Runtime.Serialization {\r
11 \r
12         /// <summary>\r
13         /// Creation of serialization surrogate selectors</summary>\r
14         public interface ISurrogateSelector {\r
15 \r
16                 /// <summary>\r
17                 /// Insert specified selector into available surrogates</summary>\r
18                 void ChainSelector( ISurrogateSelector selector );\r
19 \r
20                 /// <summary>\r
21                 /// Return next surrogate in the surrogate chain</summary>\r
22                 ISurrogateSelector GetNextSelector();\r
23 \r
24                 /// <summary>\r
25                 /// Fetch the surrogate according the specified type, starting\r
26                 /// the search from the surrogate selector for the specified\r
27                 /// StreamingContext</summary>\r
28                 /// <param name="type">Type of the object to be serialized</param>\r
29                 /// <param name="context">Context for the serialization/deserialization</para,>\r
30                 /// <param name="selector">Upon return, contains a reference to the selector where the returned surrogate was found</param>\r
31                 /// <returns>The surrogate for the specified type and context</returns>\r
32                 ISerializationSurrogate GetSurrogate(\r
33                         Type type,\r
34                         StreamingContext context,\r
35                         out ISurrogateSelector selector\r
36                 );\r
37 \r
38         }\r
39 \r
40 }\r