本文整理汇总了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"));
}