Ejemplo n.º 1
0
        public static string GetFullName(TypeReference type, string module)
        {
            string name     = GetNestedName(type);
            string fullName = $"{type.Namespace}.{name}";

            return(ScriptExportManager.ToFullName(module, fullName));
        }
Ejemplo n.º 2
0
        public ScriptExportMonoAttribute(CustomAttribute attribute)
        {
            if (attribute == null)
            {
                throw new ArgumentNullException(nameof(attribute));
            }

            Attribute = attribute;

            m_module   = ScriptExportMonoType.GetModule(Attribute.AttributeType);
            m_fullName = ScriptExportManager.ToFullName(Module, Attribute.AttributeType.FullName);
        }
Ejemplo n.º 3
0
        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 = ScriptExportManager.ToFullName(Module, Type.FullName);
        }
Ejemplo n.º 4
0
        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_fullName = ScriptExportManager.ToFullName(Module, Type.FullName);
        }
        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 = ScriptExportManager.ToFullName(Module, Type.FullName);
        }
Ejemplo n.º 6
0
        public ScriptExportMonoType(TypeReference type)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            Type = type;
            if (type.Module != null)
            {
                Definition = type.Resolve();
            }

            m_name     = GetName();
            m_module   = GetModule(Type);
            m_fullName = ScriptExportManager.ToFullName(Module, Type.FullName);
        }
        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     = GetName();
            m_module   = ScriptExportMonoType.GetModule(Type);
            m_fullName = ScriptExportManager.ToFullName(Module, Type.FullName);
        }
Ejemplo n.º 8
0
 public static string ToFullName(TypeReference type)
 {
     return(ScriptExportManager.ToFullName(GetModule(type), type.FullName));
 }
Ejemplo n.º 9
0
 public static string ToFullName(CustomAttribute attribute)
 {
     return(ScriptExportManager.ToFullName(GetModule(attribute.AttributeType), attribute.AttributeType.FullName));
 }