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); }
public static NBuildInfo HandlerDeclaringType(NBuildInfo instance, Type type) { instance.DeclaringType = type; instance.DeclaringTypeName = type.GetDevelopName(); instance.DeclaringAvailableName = type.GetAvailableName(); return(instance); }
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); }