Esempio n. 1
0
        public static NBuildInfo HandlerArrayType(NBuildInfo instance, Type type)
        {
            if (type.IsArray)
            {
                Type temp = type;
                instance.ElementType              = type.GetElementType();
                instance.ElementTypeName          = instance.ElementType.GetDevelopName();
                instance.ElementTypeAvailableName = instance.ElementType.GetAvailableName();


                int count = 0;
                while (temp.HasElementType)
                {
                    count++;
                    temp = temp.GetElementType();
                }
                instance.ArrayLayer                 = count;
                instance.ArrayBaseType              = temp;
                instance.ArrayBaseTypeName          = instance.ArrayBaseType.GetDevelopName();
                instance.ArrayBaseTypeAvaliableName = instance.ArrayBaseType.GetAvailableName();


                var ctor = type.GetConstructors()[0];
                instance.ArrayDimensions = ctor.GetParameters().Length;
            }

            return(instance);
        }
Esempio n. 2
0
 public static NBuildInfo HandlerDeclaringType(NBuildInfo instance, Type type)
 {
     instance.DeclaringType          = type;
     instance.DeclaringTypeName      = type.GetDevelopName();
     instance.DeclaringAvailableName = type.GetAvailableName();
     return(instance);
 }
Esempio n. 3
0
        public static NBuildInfo HandlerDeclaringType(NBuildInfo instance, Type type)
        {
            instance.CurrentType              = type;
            instance.CurrentTypeName          = type.GetDevelopName();
            instance.CurrentTypeAvailableName = type.GetAvailableName();

            instance.FatherType          = type.BaseType;
            instance.FatherTypeName      = type.BaseType.GetDevelopName();
            instance.FatherAvailableName = type.BaseType.GetAvailableName();
            return(instance);
        }