예제 #1
0
        public void CallOneArg()
        {
            var x   = new GenericOneArgType <string>("X");
            var obj = GenericUtils.Call(typeof(GenericUtilsTest), "GenericMethodOneArg", typeof(GenericOneArgType <>), x);

            Assert.IsType(typeof(GenericOneArgType <string>), obj);
            var y = (GenericOneArgType <string>)obj;

            Assert.Equal(x.A, y.A);
        }
예제 #2
0
 private GenericTwoArgType(GenericOneArgType <TA> a, GenericOneArgType <TB> b)
 {
     _a = a;
     _b = b;
 }
예제 #3
0
 public static GenericOneArgType <T> GenericMethodOneArg <T>(GenericOneArgType <T> a)
 {
     return(a);
 }