System.Runtime.Serialization.ISurrogateSelector Interface

Assembly: Mscorlib.dll
Namespace: System.Runtime.Serialization
Summary
Indicates a serialization surrogate selector class.
C# Syntax:
public interface ISurrogateSelector
Remarks
Surrogate selectors implement the ISurrogateSelector interface to assist formatters in selecting surrogates to delegate to the serialization or deserialization of other objects.
See also:
System.Runtime.Serialization Namespace

System.Runtime.Serialization.ISurrogateSelector Member List:

Public Methods
ChainSelector Specifies the next ISurrogateSelector for surrogates to examine if the current instance does not have a surrogate for the specified type and assembly in the specified context.
GetNextSelector Returns the next surrogate selector in the chain.
GetSurrogate Finds the surrogate that represents the specified object's type, starting with the specified surrogate selector for the specified serialization context.

System.Runtime.Serialization.ISurrogateSelector Member Details

Method: ChainSelector(
   ISurrogateSelector selector
)
Summary
Specifies the next ISurrogateSelector for surrogates to examine if the current instance does not have a surrogate for the specified type and assembly in the specified context.
C# Syntax:
void ChainSelector(
   ISurrogateSelector selector
);
Parameters:

selector

The next surrogate selector to examine.

Return to top


Method: GetNextSelector()
Summary
Returns the next surrogate selector in the chain.
C# Syntax:
ISurrogateSelector GetNextSelector();
Return Value:
The next surrogate selector in the chain, or null.

Return to top


Method: GetSurrogate(
   Type type,
   StreamingContext context,
   out ISurrogateSelector selector
)
Summary
Finds the surrogate that represents the specified object's type, starting with the specified surrogate selector for the specified serialization context.
C# Syntax:
ISerializationSurrogate GetSurrogate(
   Type type,
   StreamingContext context,
   out ISurrogateSelector selector
);
Parameters:

type

The Type of object (class) that needs a surrogate.

context

The source or destination context for the current serialization.

selector

When this method returns, contains an ISurrogateSelector that holds a reference to the surrogate selector where the appropriate surrogate was found. This parameter is passed uninitialized.

Return Value:
The appropriate surrogate for the given type in the given context.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.