Exemple #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;
 }
Exemple #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;
 }
Exemple #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));
                }
            }
        }
Exemple #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));
            }
              }
        }