Example #1
0
        private bool MarshalClassArrayByRef()
        {
            ClassToMarshal[] c  = new ClassToMarshal[] { new ClassToMarshal(123, "hello") };
            ClassToMarshal   c2 = new ClassToMarshal(456, "goodbye");

            m_mbroProxy.MarshalClassByRef(ref c[0], c2);

            return(this.EqualsButNotSameInstance(c[0], c2));
        }
Example #2
0
        public override bool Equals(object obj)
        {
            ClassToMarshal cls = obj as ClassToMarshal;

            if (cls == null)
            {
                return(false);
            }
            if (cls.m_int != m_int)
            {
                return(false);
            }
            if (cls.m_string != m_string)
            {
                return(false);
            }

            return(true);
        }
Example #3
0
 public void MarshalClassByRef(ref ClassToMarshal c, ClassToMarshal c2)
 {
     c = c2;
 }
Example #4
0
        private bool MarshalClass()
        {
            ClassToMarshal c = new ClassToMarshal(123, "hello");

            return(EqualsButNotSameInstance(c, m_mbroProxy.MarshalClass(c)));
        }
Example #5
0
 public ClassToMarshal MarshalClass(ClassToMarshal c)
 {
     return(c);
 }
Example #6
0
        private bool MarshalClassArrayByRef()
        {                        
            ClassToMarshal[] c = new ClassToMarshal[] {new ClassToMarshal( 123, "hello" )};
            ClassToMarshal c2 = new ClassToMarshal( 456, "goodbye" );
            
            m_mbroProxy.MarshalClassByRef( ref c[0], c2 );

            return this.EqualsButNotSameInstance( c[0], c2 );
        }
Example #7
0
        private bool MarshalClass()
        {
            ClassToMarshal c = new ClassToMarshal( 123, "hello" );

            return EqualsButNotSameInstance( c, m_mbroProxy.MarshalClass( c ) );
        }
Example #8
0
 public void MarshalClassByRef( ref ClassToMarshal c, ClassToMarshal c2 )
 {
     c = c2;
 }
Example #9
0
 public ClassToMarshal MarshalClass( ClassToMarshal c )
 {
     return c;
 }