AnyObjectSerializerWrapper Constructor

Creates a new instance of AnyObjectSerializerWrapper with the provided object to be serialized.

Definition

Namespace: KGySoft.Serialization.Binary
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public AnyObjectSerializerWrapper(
	Object? obj,
	bool useWeakAssemblyBinding,
	bool forceSerializationByFields = false
)

Parameters

obj  Object
The Object to serialize. Non-serializable, remote objects, and instances are supported, too.
useWeakAssemblyBinding  Boolean
When , the assembly versions of types do not need to match on deserialization. This makes possible to deserialize objects stored in different versions of the original assembly.
forceSerializationByFields  Boolean  (Optional)
to ignore ISerializable and IObjectReference implementations as well as serialization constructors and serializing methods; to consider all of these techniques instead performing a forced field-based serialization. Can be useful for types that implement ISerializable but the implementation throws a PlatformNotSupportedException (on .NET Core, for example). It still does not guarantee that the object will be deserializable on another platform. This parameter is optional.
Default value: .

See Also