本文整理匯總了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"}));
}
示例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"));
}
示例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"));
}
示例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"}));
}
示例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"}}));
}
示例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));
}
示例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"));
}
示例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"}));
}
示例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"}}));
}
示例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"}}));
}
示例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"));
}
示例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}));
}
示例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"}));
}
示例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"));
}