Example #1
0
 public override bool HasMember(string name)
 {
     if (base.HasMember(name))
     {
         return(true);
     }
     return(ScriptExportMonoType.HasMember(Type.ElementType, name));
 }
Example #2
0
        public ScriptExportMonoAttribute(CustomAttribute attribute)
        {
            if (attribute == null)
            {
                throw new ArgumentNullException(nameof(attribute));
            }

            Attribute = attribute;

            Module   = ScriptExportMonoType.GetModule(Attribute.AttributeType);
            FullName = ToFullName(Attribute, Module);
        }
Example #3
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);
        }
        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);
        }
Example #5
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);
        }
Example #6
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 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);
        }
Example #8
0
        public ScriptExportMonoEnum(TypeReference @enum)
        {
            if (@enum == null)
            {
                throw new ArgumentNullException(nameof(@enum));
            }

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

            Name     = ScriptExportMonoType.GetName(Type);
            Module   = ScriptExportMonoType.GetModule(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;

            TypeName = ScriptExportMonoType.GetTypeName(Type);
            Name     = ScriptExportMonoType.GetName(Type, TypeName);
            Module   = ScriptExportMonoType.GetModule(Type);
            FullName = ScriptExportMonoType.GetFullName(Type, Module);
        }
Example #10
0
 public static string ToFullName(CustomAttribute attribute, string module)
 {
     return(ScriptExportMonoType.GetFullName(attribute.AttributeType, module));
 }
Example #11
0
 public static string ToFullName(CustomAttribute attribute)
 {
     return(ScriptExportMonoType.ToFullName(attribute.AttributeType));
 }