public ScriptExportMonoDelegate(TypeDefinition @delegate) { if (@delegate == null) { throw new ArgumentNullException(nameof(@delegate)); } if (!IsDelegate(@delegate)) { throw new Exception("Type isn't delegate"); } Type = @delegate; m_module = ScriptExportMonoType.GetModule(Type); m_fullName = ScriptExportMonoType.ToFullName(Type, Module); }
public ScriptExportMonoEnum(TypeReference @enum) { if (@enum == null) { throw new ArgumentNullException(nameof(@enum)); } Type = @enum; if (@enum.Module != null) { Definition = @enum.Resolve(); } m_module = ScriptExportMonoType.GetModule(Type); m_fullName = ScriptExportMonoType.ToFullName(Type, Module); }
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; m_name = ScriptExportMonoType.GetName(type); m_module = ScriptExportMonoType.GetModule(Type); m_fullName = ScriptExportMonoType.ToFullName(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; m_module = ScriptExportMonoType.GetModule(Type); m_name = ScriptExportMonoType.GetName(Type); m_fullName = ScriptExportMonoType.ToFullName(Type, Module); }
public static string ToFullName(CustomAttribute attribute, string module) { return(ScriptExportMonoType.ToFullName(attribute.AttributeType, module)); }