AnyObjectSerializerWrapper Constructor
Namespace: KGySoft.Serialization.BinaryAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public AnyObjectSerializerWrapper(
Object? obj,
bool useWeakAssemblyBinding,
bool forceSerializationByFields = false
)
Public Sub New (
obj As Object,
useWeakAssemblyBinding As Boolean,
Optional forceSerializationByFields As Boolean = false
)
public:
AnyObjectSerializerWrapper(
Object^ obj,
bool useWeakAssemblyBinding,
bool forceSerializationByFields = false
)
new :
obj : Object *
useWeakAssemblyBinding : bool *
?forceSerializationByFields : bool
(* Defaults:
let _forceSerializationByFields = defaultArg forceSerializationByFields false
*)
-> AnyObjectSerializerWrapper
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: .