Type serializer of custom objects.
Namespace: Nemiro.Data.CachingAssembly: Nemiro.Data (in Nemiro.Data.dll) Version: 2.11.4.126 (2.11.4.126)
public Type Binder { get; set; }
public Type Binder { get; set; }
Public Property Binder As Type
Get
Set
Public Property Binder As Type
Get
Set
Property Value
Type:
TypeOnly for CacheType = File.
The following example shows sample code class CacheBinder.
You can copy it and use in owner projects.
using System.Reflection;
public sealed class MyCacheBinder : System.Runtime.Serialization.SerializationBinder
{
public override Type BindToType(string assemblyName, string typeName)
{
return Type.GetType(String.Format("{0}, {1}", typeName, Assembly.GetExecutingAssembly().FullName));
}
}
using System.Reflection;
public sealed class MyCacheBinder : System.Runtime.Serialization.SerializationBinder
{
public override Type BindToType(string assemblyName, string typeName)
{
return Type.GetType(String.Format("{0}, {1}", typeName, Assembly.GetExecutingAssembly().FullName));
}
}
Imports System.Reflection
Public NotInheritable Class MyCacheBinder
Inherits System.Runtime.Serialization.SerializationBinder
Public Overloads Overrides Function BindToType(assemblyName As String, typeName As String) As Type
Return Type.GetType(String.Format("{0}, {1}", typeName, Assembly.GetExecutingAssembly().FullName))
End Function
End Class
Imports System.Reflection
Public NotInheritable Class MyCacheBinder
Inherits System.Runtime.Serialization.SerializationBinder
Public Overloads Overrides Function BindToType(assemblyName As String, typeName As String) As Type
Return Type.GetType(String.Format("{0}, {1}", typeName, Assembly.GetExecutingAssembly().FullName))
End Function
End Class