10 internal SurrogateHashtable m_surrogates;
17 m_surrogates =
new SurrogateHashtable(32);
32 if (surrogate ==
null)
36 SurrogateKey key =
new SurrogateKey(type, context);
37 m_surrogates.Add(key, surrogate);
45 while (surrogateSelector !=
null)
48 if (surrogateSelector ==
null)
52 if (surrogateSelector == surrogateSelector2)
58 if (surrogateSelector == surrogateSelector2)
82 if (!HasCycle(selector))
88 while (nextSelector !=
null && nextSelector !=
this)
90 surrogateSelector = nextSelector;
93 if (nextSelector ==
this)
97 nextSelector = selector;
99 while (nextSelector !=
null)
102 if (nextSelector ==
null)
106 if (nextSelector == surrogateSelector2)
112 if (nextSelector == surrogateSelector2)
118 m_nextSelector = selector;
119 if (nextSelector2 !=
null)
131 return m_nextSelector;
149 SurrogateKey key =
new SurrogateKey(type, context);
151 if (serializationSurrogate !=
null)
153 return serializationSurrogate;
155 if (m_nextSelector !=
null)
157 return m_nextSelector.
GetSurrogate(type, context, out selector);
172 SurrogateKey key =
new SurrogateKey(type, context);
173 m_surrogates.Remove(key);
virtual void ChainSelector(ISurrogateSelector selector)
Adds the specified T:System.Runtime.Serialization.ISurrogateSelector that can handle a particular obj...
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
virtual ISerializationSurrogate GetSurrogate(Type type, StreamingContext context, out ISurrogateSelector selector)
Returns the surrogate for a particular type.
ISurrogateSelector GetNextSelector()
Returns the next surrogate selector in the chain.
ISerializationSurrogate GetSurrogate(Type type, StreamingContext context, out ISurrogateSelector selector)
Finds the surrogate that represents the specified object's type, starting with the specified surrogat...
virtual void RemoveSurrogate(Type type, StreamingContext context)
Removes the surrogate associated with a given type.
Describes the source and destination of a given serialized stream, and provides an additional caller-...
Provides information about, and means to manipulate, the current environment and platform....
SurrogateSelector()
Initializes a new instance of the T:System.Runtime.Serialization.SurrogateSelector class.
virtual void AddSurrogate(Type type, StreamingContext context, ISerializationSurrogate surrogate)
Adds a surrogate to the list of checked surrogates.
Implements a serialization surrogate selector that allows one object to perform serialization and des...
void ChainSelector(ISurrogateSelector selector)
Specifies the next T:System.Runtime.Serialization.ISurrogateSelector for surrogates to examine if the...
Represents type declarations: class types, interface types, array types, value types,...
The exception thrown when an error occurs during serialization or deserialization.
Indicates a serialization surrogate selector class.
The exception that is thrown when one of the arguments provided to a method is not valid.
virtual ISurrogateSelector GetNextSelector()
Returns the next selector on the chain of selectors.
Assists formatters in selection of the serialization surrogate to delegate the serialization or deser...