ForwardedTypesSerializationBinderSafeMode Property

Gets or sets whether all the type names that occur in the serialization stream must have a defined mapping to a type.
Default value: .

Definition

Namespace: KGySoft.Serialization.Binary
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.5.0
C#
public bool SafeMode { get; set; }

Property Value

Boolean

Remarks

If SafeMode is , and there is no rule specified for a type, then a SerializationException will be thrown when BindToType is called.

If SafeMode is , then BindToType is allowed to resolve the type automatically and can even load assemblies during the deserialization.

To prevent the consumer IFormatter from loading assemblies the BindToType method never returns ; instead, it throws a SerializationException if a type could not be resolved.

See Also