KGy SOFT

WeakAssemblySerializationBinder Class

KGy SOFT Core Libraries Help
Provides a SerializationBinder instance for IFormatter implementations that can ignore version and token information of stored assembly name. This makes possible to deserialize objects stored in different version of the original assembly.
Inheritance Hierarchy

SystemObject
  System.Runtime.SerializationSerializationBinder
    KGySoft.SerializationWeakAssemblySerializationBinder

Namespace:  KGySoft.Serialization
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-alpha.1
Syntax

public sealed class WeakAssemblySerializationBinder : SerializationBinder

The WeakAssemblySerializationBinder type exposes the following members.

Constructors

  NameDescription
Public methodWeakAssemblySerializationBinder
Initializes a new instance of the WeakAssemblySerializationBinder class
Top
Properties

  NameDescription
Public propertyOmitAssemblyNameOnSerialize
Gets or sets whether assembly name should be completely omitted on serialization.
Default value: .
Top
Methods

  NameDescription
Public methodBindToName
When OmitAssemblyNameOnSerialize is , suppresses the assembly name on serialization. Otherwise, returns  for both assembly and type names, indicating, that the original names should be used.
(Overrides SerializationBinderBindToName(Type, String, String).)
Public methodBindToType
Retrieves a type by its assemblyName and typeName.
(Overrides SerializationBinderBindToType(String, String).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods

  NameDescription
Public Extension MethodConvert(Type, CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions.)
Public Extension MethodCode exampleConvertTTarget(CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)
Public Extension MethodIn (Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, CultureInfo, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(CultureInfo, TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Top
See Also

Reference