Exemplo n.º 1
0
 public ClClassData(string instanceName, ClClass classType) : this(instanceName, classType.ClassName, new List <ClFieldData>(), new List <ClEnumerableFieldData>())
 {
     foreach (var f in classType.Fields)
     {
         FieldDatas.Add(new ClFieldData(f)); // populates field data list with new instances constructed from field data
     }
 }
Exemplo n.º 2
0
        // Read all list and save to ouput fileds to ClClass
        public ClClass CreateTestClassPrimitive()
        {
            var output = new ClClass("Primitive Class");

            foreach (string sName in testInt)
            {
                output.Fields.Add(new ClField(sName, typeof(int)));
            }
            foreach (string sName in testString)
            {
                output.Fields.Add(new ClField(sName, typeof(string)));
            }
            foreach (string sName in testByte)
            {
                output.Fields.Add(new ClField(sName, typeof(Byte)));
            }
            foreach (string sName in testFloat)
            {
                output.Fields.Add(new ClField(sName, typeof(float)));
            }

            foreach (string sName in testListInt)
            {
                output.Fields.Add(new ClEnumerableField(sName, typeof(int)));
            }

            foreach (string sName in testListString)
            {
                output.Fields.Add(new ClEnumerableField(sName, typeof(string)));
            }

            return(output);
        }
        public static ClClass CreateTestClassEnumerable()
        {
            var output = new ClClass("Class With Enumerable");

            output.Fields.Add(new ClField("Int Field", typeof(int)));
            output.Fields.Add(new ClField("Byte Field", typeof(byte)));
            output.Fields.Add(new ClField("String Field", typeof(string)));
            output.Fields.Add(new ClEnumerableField("List Int Field", typeof(int)));

            return(output);
        }
        //TODO we need better tests
        public static ClClass CreateTestClassPrimitive()
        {
            var output = new ClClass("Primitive Class");

            output.Fields.Add(new ClField("Int Field", typeof(int)));
            output.Fields.Add(new ClField("Byte Field", typeof(byte)));
            output.Fields.Add(new ClField("String Field", typeof(string)));
            output.Fields.Add(new ClField("Float Field", typeof(float)));

            return(output);
        }
Exemplo n.º 5
0
 public ClClassData(ClClass classType) : this("Unnamed Instance", classType)
 {
 }