示例#1
0
 internal JSPredefinedField(string name, MemberTypes memberType, GlobalObjectInstance globalObject)
     : base(name, 0, null)
 {
     m_memberType = memberType;
     m_globalObject = globalObject;
     // predefined fields cannot be crunched
     CanCrunch = false;
 }
示例#2
0
 internal JSPredefinedField(string name, MemberTypes memberType, GlobalObjectInstance globalObject)
     : base(name, 0, null)
 {
     m_memberType   = memberType;
     m_globalObject = globalObject;
     // predefined fields cannot be crunched
     CanCrunch = false;
 }
示例#3
0
        public GlobalObject(GlobalObjectInstance globalObject, string[] properties, string[] methods)
        {
            m_fieldMap = new Dictionary <string, JSPredefinedField>();

            // itemize all the properties
            if (properties != null)
            {
                foreach (string fieldName in properties)
                {
                    m_fieldMap.Add(fieldName, new JSPredefinedField(fieldName, MemberTypes.Property, globalObject));
                }
            }

            // itemize all the methods
            if (methods != null)
            {
                foreach (string fieldName in methods)
                {
                    m_fieldMap.Add(fieldName, new JSPredefinedField(fieldName, MemberTypes.Method, globalObject));
                }
            }
        }
示例#4
0
        public GlobalObject(GlobalObjectInstance globalObject, string[] properties, string[] methods)
        {
            m_fieldMap = new Dictionary<string,JSPredefinedField>();

              // itemize all the properties
              if (properties != null)
              {
            foreach(string fieldName in properties)
            {
              m_fieldMap.Add(fieldName, new JSPredefinedField(fieldName, MemberTypes.Property, globalObject));
            }
              }

              // itemize all the methods
              if (methods != null)
              {
            foreach(string fieldName in methods)
            {
              m_fieldMap.Add(fieldName, new JSPredefinedField(fieldName, MemberTypes.Method, globalObject));
            }
              }
        }