ISurrogateSelector.cs 1.2 KB

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