Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the System.Runtime.Remoting.ObjRef class from
        /// serialized data.
        /// </summary>
        /// <param name="info">The object that holds the serialized object data.</param>
        /// <param name="context">The contextual information about the source or destination of the exception.</param>
        private CrossAppDomainObjRef(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            Debug.Assert(context.State == StreamingContextStates.CrossAppDomain);
            Debug.Assert(IsFromThisProcess());
            Debug.Assert(IsFromThisAppDomain() == false);
            //Increment ref counter
            CrossAppDomainObject remoteObject = (CrossAppDomainObject)GetRealObject(new StreamingContext(StreamingContextStates.CrossAppDomain));

            remoteObject.AppDomainConnect();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the CrossAppDomainObjRef class to
 /// reference a specified CrossAppDomainObject of a specified System.Type.
 /// </summary>
 /// <param name="instance">The object that the new System.Runtime.Remoting.ObjRef instance will reference.</param>
 /// <param name="requestedType"></param>
 public CrossAppDomainObjRef(CrossAppDomainObject instance, Type requestedType)
     : base(instance, requestedType)
 {
     //Proxy created locally (not remoted), the finalizer is meaningless.
     GC.SuppressFinalize(this);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the CrossAppDomainObjRef class to
 /// reference a specified CrossAppDomainObject of a specified System.Type.
 /// </summary>
 /// <param name="instance">The object that the new System.Runtime.Remoting.ObjRef instance will reference.</param>
 /// <param name="requestedType"></param>
 public CrossAppDomainObjRef(CrossAppDomainObject instance, Type requestedType)
     : base(instance, requestedType)
 {
     //Proxy created locally (not remoted), the finalizer is meaningless.
     GC.SuppressFinalize(this);
 }