O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

SurrogateSelector

Synopsis

This class is the basic implementation of the ISurrogateSelector interface. A formatter uses this class to find the appropriate surrogate object to serialize or deserialize an object of a specific type, assembly, or context.

public class SurrogateSelector : ISurrogateSelector {
// Public Constructors
   public method SurrogateSelector();  
// Public Instance Methods
   public virtual method void AddSurrogate(Type type, 
        StreamingContext context, 
        ISerializationSurrogate surrogate);  
   public virtual method void ChainSelector(                    // implements ISurrogateSelector
        ISurrogateSelector selector);  
   public virtual method ISurrogateSelector GetNextSelector();  // implements ISurrogateSelector  
   public virtual method ISerializationSurrogate GetSurrogate(  // implements ISurrogateSelector
        Type type, StreamingContext context, 
        out ISurrogateSelector selector);  
   public virtual method void RemoveSurrogate(Type type, 
        StreamingContext context);  
}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required