WeakAssemblySerializationBinderOmitAssemblyNameOnSerialize Property

Gets or sets whether assembly name should be completely omitted on serialization.
Default value: .

Definition

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

Property Value

Boolean
to omit assembly name on serialize; otherwise, .

Remarks

  Note

The value of this property is used only on serialization; however, it affects deserialization as well: when assembly name is omitted, deserialization will find the first matching type from any assembly.

Using BinarySerializationFormatter with OmitAssemblyQualifiedNames option enabled has a similar effect. However, using WeakAssemblySerializationBinder with this property set to , assembly names can be omitted even when using BinaryFormatter or other IFormatter implementations.

When the value of this property is , the serialized stream will be shorter; however, deserialization might be slower, and type will be searched only in already loaded assemblies. When multiple assemblies have types with the same name the retrieved type cannot determined.

See Also