當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。