This documentation is archived and is not being maintained.
SurrogateSelector Class
Visual Studio 2010
Assists formatters in selection of the serialization surrogate to delegate the serialization or deserialization process to.
System::Object
System.Runtime.Serialization::SurrogateSelector
System.Workflow.ComponentModel.Serialization::ActivitySurrogateSelector
System.Runtime.Serialization::SurrogateSelector
System.Workflow.ComponentModel.Serialization::ActivitySurrogateSelector
Assembly: mscorlib (in mscorlib.dll)
The SurrogateSelector type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AddSurrogate | Adds a surrogate to the list of checked surrogates. |
![]() | ChainSelector | Adds the specified ISurrogateSelector that can handle a particular object type to the list of surrogates. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetNextSelector | Returns the next selector on the chain of selectors. |
![]() | GetSurrogate | Returns the surrogate for a particular type. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | RemoveSurrogate | Removes the surrogate associated with a given type. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The following code example shows how to make a serialization surrogate class that knows how to properly serialize or deserialize a class that is not itself serializable. In addition, this example also shows how to recover from a SerializationException.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
