Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetValue()

object? System.Runtime.Serialization.SerializationInfo.GetValue ( string name,
Type type )
inline

Definition at line 316 of file SerializationInfo.cs.

317 {
318 if ((object)type == null)
319 {
320 throw new ArgumentNullException("type");
321 }
322 if (!type.IsRuntimeImplemented())
323 {
324 throw new ArgumentException(SR.Argument_MustBeRuntimeType);
325 }
327 object element = GetElement(name, out foundType);
328 if ((object)foundType == type || type.IsAssignableFrom(foundType) || element == null)
329 {
330 return element;
331 }
332 return _converter.Convert(element, type);
333 }
object GetElement(string name, out Type foundType)
object Convert(object value, Type type)

References System.Runtime.Serialization.SerializationInfo._converter, System.SR.Argument_MustBeRuntimeType, System.Runtime.Serialization.IFormatterConverter.Convert(), System.Runtime.Serialization.Dictionary, System.Runtime.Serialization.SerializationInfo.GetElement(), and System.type.

Referenced by System.Collections.Specialized.OrderedDictionary.OnDeserialization(), System.Collections.Generic.LinkedList< T >.OnDeserialization(), and System.Collections.Generic.SortedSet< T >.OnDeserialization().