示例#1
0
        private bool MarshalMBROByRef()
        {
            MyMarshalByRefObject mbro  = new MyMarshalByRefObject();
            MyMarshalByRefObject mbro2 = new MyMarshalByRefObject();

            m_mbroProxy.MarshalMBROByRef(ref mbro, mbro2);

            return(Object.ReferenceEquals(mbro, mbro2));
        }
示例#2
0
        private void Initialize()
        {
            string szAssm = typeof(AppDomainTest).Assembly.FullName;

            m_appDomain = AppDomain.CreateDomain(this.GetType().FullName);
            m_appDomain.Load(szAssm);
            m_mbroProxy = (MyMarshalByRefObject)m_appDomain.CreateInstanceAndUnwrap(szAssm, typeof(MyMarshalByRefObject).FullName);
            m_mbro      = new MyMarshalByRefObject();
        }
示例#3
0
        private void Uninitialize()
        {
            if (m_appDomain != null)
            {
                AppDomain.Unload(m_appDomain);

                m_appDomain = null;
                m_mbro      = null;
                m_mbroProxy = null;
                Debug.GC(true);
            }
        }
示例#4
0
 public void MarshalMBROByRef(ref MyMarshalByRefObject mbro, MyMarshalByRefObject mbro2)
 {
     mbro = mbro2;
 }
示例#5
0
 public MyMarshalByRefObject MarshalMBRO(MyMarshalByRefObject mbro)
 {
     return(mbro);
 }
示例#6
0
 public void MarshalDeadProxy(MyMarshalByRefObject mbro)
 {
 }
示例#7
0
 public void MarshalDyingProxy(MyMarshalByRefObject mbro)
 {
 }
示例#8
0
 public void MarshalDyingProxy( MyMarshalByRefObject mbro )
 {
 }
示例#9
0
        private bool MarshalMBROByRef()
        {
            MyMarshalByRefObject mbro = new MyMarshalByRefObject();
            MyMarshalByRefObject mbro2 = new MyMarshalByRefObject();

            m_mbroProxy.MarshalMBROByRef( ref mbro, mbro2 );

            return Object.ReferenceEquals( mbro, mbro2 );            
        }
示例#10
0
        private void Uninitialize()
        {                        
            if(m_appDomain != null)
            {
                AppDomain.Unload( m_appDomain );

                m_appDomain = null;
                m_mbro      = null;
                m_mbroProxy = null;
                Debug.GC( true );
            }
        }
示例#11
0
 private void Initialize()
 {
     string szAssm = typeof( AppDomainTest ).Assembly.FullName;
     m_appDomain = AppDomain.CreateDomain( this.GetType().FullName );
     m_appDomain.Load( szAssm );
     m_mbroProxy = (MyMarshalByRefObject)m_appDomain.CreateInstanceAndUnwrap( szAssm, typeof( MyMarshalByRefObject ).FullName );
     m_mbro = new MyMarshalByRefObject();
 }
示例#12
0
 public void MarshalMBROByRef( ref MyMarshalByRefObject mbro,  MyMarshalByRefObject mbro2)
 {
     mbro = mbro2;
 }        
示例#13
0
 public MyMarshalByRefObject MarshalMBRO( MyMarshalByRefObject mbro )
 {
     return mbro;
 }        
示例#14
0
 public void MarshalDeadProxy( MyMarshalByRefObject mbro )
 {
 }
示例#15
0
 public MyMarshalByRefObjectHolder( MyMarshalByRefObject mymbro, MyMarshalByRefObject proxy )
 {
     m_mymbro = mymbro;
     m_proxy  = proxy;
 }
示例#16
0
        private bool MarshalMBRO()
        {
            MyMarshalByRefObject mbro = m_mbroProxy.MarshalMBRO(m_mbro);

            return(mbro == m_mbro);
        }
示例#17
0
 public bool ProxyEquality(MyMarshalByRefObject mbro1, MyMarshalByRefObject mbro2)
 {
     return(mbro1 == mbro2);
 }
示例#18
0
 public MyMarshalByRefObjectHolder(MyMarshalByRefObject mymbro, MyMarshalByRefObject proxy)
 {
     m_mymbro = mymbro;
     m_proxy  = proxy;
 }
示例#19
0
 public bool ProxyEquality( MyMarshalByRefObject mbro1, MyMarshalByRefObject mbro2)
 {
     return mbro1 == mbro2;
 }