public static void DynamicInvoke_TypeDoesntExactlyMatchRefValueType_ThrowsArgumentException() { Delegate d = new RefIntDelegate(RefIntMethod); AssertExtensions.Throws <ArgumentException>(null, () => d.DynamicInvoke((uint)7)); AssertExtensions.Throws <ArgumentException>(null, () => d.DynamicInvoke(IntEnum.One)); }
public static void DynamicInvoke_RefValueTypeParameter(object[] args, object[] expected) { Delegate d = new RefIntDelegate(RefIntMethod); d.DynamicInvoke(args); Assert.Equal(expected, args); }
public static void DynamicInvoke_TypeDoesntExactlyMatchRefValueType_ThrowsArgumentException() { Delegate d = new RefIntDelegate(RefIntMethod); Assert.Throws<ArgumentException>(null, () => d.DynamicInvoke((uint)7)); Assert.Throws<ArgumentException>(null, () => d.DynamicInvoke(IntEnum.One)); }