Exemplo n.º 1
0
        public void CreateProxyFromAbstractClassWithStructRefParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<StructRefParameterBase>(Type.EmptyTypes, invocationHandler);
            var value = new StructType {Integer = 2, String = "2"};

            proxy.Method(ref value);

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(new StructType {Integer = 2, String = "2"}));
        }
Exemplo n.º 2
0
 public virtual void Method(ref StructType[] value)
 {
     value = new StructType[0];
 }
Exemplo n.º 3
0
 public virtual void Method(ref StructType value)
 {
     value = default(StructType);
 }
Exemplo n.º 4
0
 protected StructConstructorBase(StructType value)
 {
 }