Serialization proxy class used for serializing/deserializing singleton objects, which should be mapped to the existing instance upon deserialization.

Namespace: MonoSoftware.Core
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
[SerializableAttribute]
public sealed class SerializationProxy<TOwner, TKey> : ISerializable, 
	IObjectReference
Visual Basic
<SerializableAttribute>
Public NotInheritable Class SerializationProxy(Of TOwner, TKey)
	Implements ISerializable, IObjectReference
Visual C++
[SerializableAttribute]
generic<typename TOwner, typename TKey>
public ref class SerializationProxy sealed : ISerializable, 
	IObjectReference
F#
[<SealedAttribute>]
[<SerializableAttribute>]
type SerializationProxy<'TOwner, 'TKey> =  
    class
        interface ISerializable
        interface IObjectReference
    end

Type Parameters

TOwner
TKey

Remarks

This class is based upon the following logic: SomeSerializableSingleton.GetObjectData serializes this class and not itself, this class needs also to be ISerializable, so .NET will know to call its deserialization constructor upon deserialization. This class's GetObjectData is never called. When the deserialization finishes, the passed _instantiator func is called. Check this for more info: http://stackoverflow.com/questions/701656/real-object-references-in-distributed-cache

Inheritance Hierarchy

System..::..Object
  MonoSoftware.Core..::..SerializationProxy<(Of <(<'TOwner, TKey>)>)>

See Also