public static PrimitiveType Register <T>(string rawName, string name, string toString = null, params string[] constants) where T : struct { var type = new PrimitiveType(); type.BaseType = typeof(T); type.RawName = rawName; type.Name = name; type.NativeName = NativeTypes.GetNativeName <T>(); type.ToStringBody = toString; type.Constants = constants; _primitiveTypes.Add(rawName, type); return(type); }
private static string TranslateName(string rawName) { string name; if (PrimitiveType.TryGetName(rawName, out name)) { return(name); } if (NativeTypes.TryGetName(rawName, out name)) { return(name); } switch (rawName) { case "DT_CSTRING": case "DT_FORMULA": case "DT_CHARARRAY": return("string"); default: return(rawName); } }
public static bool IsNative(this FieldDescriptor field) { return(NativeTypes.Contains(field.GetFieldType().x04_Name)); }
public static bool IsNative(this ValueTypeDescriptor descriptor) { return(NativeTypes.Contains(descriptor.x04_Name)); }