当前位置: 首页>>代码示例>>C#>>正文


C# Test.GetParametersInvocationHandler类代码示例

本文整理汇总了C#中NProxy.Core.Test.GetParametersInvocationHandler的典型用法代码示例。如果您正苦于以下问题:C# GetParametersInvocationHandler类的具体用法?C# GetParametersInvocationHandler怎么用?C# GetParametersInvocationHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GetParametersInvocationHandler类属于NProxy.Core.Test命名空间,在下文中一共展示了GetParametersInvocationHandler类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateProxyFromAbstractClassWithStructRefParameterTest

        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"}));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:14,代码来源:ProxyFactoryTestFixture.cs

示例2: CreateProxyFromAbstractClassWithGenericRefParameterTest

        public void CreateProxyFromAbstractClassWithGenericRefParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<GenericRefParameterBase>(Type.EmptyTypes, invocationHandler);
            var value = "Two";

            proxy.Method(ref value);

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo("Two"));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:14,代码来源:ProxyFactoryTestFixture.cs

示例3: CreateProxyFromAbstractClassWithStringParameterTest

        public void CreateProxyFromAbstractClassWithStringParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<StringParameterBase>(Type.EmptyTypes, invocationHandler);

            proxy.Method("2");

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo("2"));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs

示例4: CreateProxyFromInterfaceWithStructParameterTest

        public void CreateProxyFromInterfaceWithStructParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<IStructParameter>(Type.EmptyTypes, invocationHandler);

            proxy.Method(new StructType {Integer = 2, String = "2"});

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(new StructType {Integer = 2, String = "2"}));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs

示例5: CreateProxyFromAbstractClassWithGenericRankArrayParameterTest

        public void CreateProxyFromAbstractClassWithGenericRankArrayParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<GenericRankArrayParameterBase>(Type.EmptyTypes, invocationHandler);

            proxy.Method(new[,] {{"Two", "Two"}});

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(new[,] {{"Two", "Two"}}));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs

示例6: CreateProxyFromInterfaceWithIntParameterTest

        public void CreateProxyFromInterfaceWithIntParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<IIntParameter>(Type.EmptyTypes, invocationHandler);

            proxy.Method(2);

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(2));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs

示例7: CreateProxyFromInterfaceWithStringRefParameterTest

        public void CreateProxyFromInterfaceWithStringRefParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<IStringRefParameter>(Type.EmptyTypes, invocationHandler);
            var value = "2";

            proxy.Method(ref value);

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo("2"));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:14,代码来源:ProxyFactoryTestFixture.cs

示例8: CreateProxyFromInterfaceWithGenericListParameterTest

        public void CreateProxyFromInterfaceWithGenericListParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<IGenericListParameter>(Type.EmptyTypes, invocationHandler);

            proxy.Method(new List<string> {"Two"});

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(new List<string> {"Two"}));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs

示例9: CreateProxyFromInterfaceWithGenericRankArrayRefParameterTest

        public void CreateProxyFromInterfaceWithGenericRankArrayRefParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<IGenericRankArrayRefParameter>(Type.EmptyTypes, invocationHandler);
            var value = new[,] {{"Two", "Two"}};

            proxy.Method(ref value);

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(new[,] {{"Two", "Two"}}));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:14,代码来源:ProxyFactoryTestFixture.cs

示例10: CreateProxyFromDelegateWithStructArrayParameterTest

        public void CreateProxyFromDelegateWithStructArrayParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<Action<StructType[]>>(Type.EmptyTypes, invocationHandler);

            proxy(new[] {new StructType {Integer = 2, String = "2"}});

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(new[] {new StructType {Integer = 2, String = "2"}}));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs

示例11: CreateProxyFromDelegateWithStringParameterTest

        public void CreateProxyFromDelegateWithStringParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<Action<string>>(Type.EmptyTypes, invocationHandler);

            proxy("2");

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo("2"));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs

示例12: CreateProxyFromDelegateWithEnumArrayParameterTest

        public void CreateProxyFromDelegateWithEnumArrayParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<Action<EnumType[]>>(Type.EmptyTypes, invocationHandler);

            proxy(new[] {EnumType.Two});

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(new[] {EnumType.Two}));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs

示例13: CreateProxyFromClassWithStringArrayRefParameterTest

        public void CreateProxyFromClassWithStringArrayRefParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<StringArrayRefParameter>(Type.EmptyTypes, invocationHandler);
            var value = new[] {"2"};

            proxy.Method(ref value);

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo(new[] {"2"}));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:14,代码来源:ProxyFactoryTestFixture.cs

示例14: CreateProxyFromClassWithGenericParameterTest

        public void CreateProxyFromClassWithGenericParameterTest()
        {
            // Arrange
            var invocationHandler = new GetParametersInvocationHandler();

            // Act
            var proxy = _proxyFactory.CreateProxy<GenericParameter>(Type.EmptyTypes, invocationHandler);

            proxy.Method("Two");

            // Assert
            Assert.That(invocationHandler.Parameters[0], Is.EqualTo("Two"));
        }
开发者ID:mtamme,项目名称:NProxy,代码行数:13,代码来源:ProxyFactoryTestFixture.cs


注:本文中的NProxy.Core.Test.GetParametersInvocationHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。