public ScriptExportMonoGeneric(TypeReference type) { if (type == null) { throw new ArgumentNullException(nameof(type)); } if (!type.IsGenericInstance) { throw new Exception("Type isn't generic"); } Type = (GenericInstanceType)type; CleanName = ScriptExportMonoType.GetSimpleName(Type); TypeName = ScriptExportMonoType.GetTypeName(Type); NestedName = ScriptExportMonoType.GetNestedName(Type, TypeName); Module = ScriptExportMonoType.GetModuleName(Type); FullName = ScriptExportMonoType.GetFullName(Type, Module); }
public ScriptExportMonoArray(TypeReference type) { if (type == null) { throw new ArgumentNullException(nameof(type)); } if (!type.IsArray) { throw new Exception("Type isn't an array"); } Type = type; CleanName = ScriptExportMonoType.GetSimpleName(Type); TypeName = ScriptExportMonoType.GetTypeName(Type); NestedName = ScriptExportMonoType.GetNestedName(Type, TypeName); Module = ScriptExportMonoType.GetModuleName(Type); FullName = ScriptExportMonoType.GetFullName(Type, Module); }