Exemplo n.º 1
0
        public void Can_Transform_Nested_Type_Arguments()
        {
            var transformed = GenericTypeMapper.TransformGenericTypeNames("Func< Func<Func<int,int>,bool> >",
                                                                          (type) => "*" + type);

            Assert.AreEqual("*Func`1<*Func`2<*Func`2<*System.Int32,*System.Int32>,*System.Boolean>>", transformed);
        }
Exemplo n.º 2
0
 public TypeParameterFixerVisitor(GenericTypeMapper genericParametersMapping)
 {
     Contract.Requires(genericParametersMapping != null);
     this.genericParametersMapping = genericParametersMapping;
 }
Exemplo n.º 3
0
        public void Can_Expand_Nested_GenericArgumentNames()
        {
            var expanded = GenericTypeMapper.ConvertClrTypeNames("Func< Func<Func<int,int>,bool> >");

            Assert.AreEqual("Func`1<Func`2<Func`2<System.Int32,System.Int32>,System.Boolean>>", expanded);
        }
Exemplo n.º 4
0
        public void Can_Expand_GenericTypeArgumentNames()
        {
            string expanded = GenericTypeMapper.ConvertClrTypeNames("Func<int,int,int,bool>");

            Assert.AreEqual("Func`4<System.Int32,System.Int32,System.Int32,System.Boolean>", expanded);
        }