FastSetProperties() private method

Sets up multiple properties at once.
private FastSetProperties ( IEnumerable properties ) : void
properties IEnumerable The list of properties to set.
return void
Beispiel #1
0
 /// <summary>
 /// Initializes the prototype properties.
 /// </summary>
 /// <param name="obj"> The object to set the properties on. </param>
 /// <param name="constructor"> A reference to the constructor that owns the prototype. </param>
 internal static void InitializePrototypeProperties(ObjectInstance obj, SymbolConstructor constructor)
 {
     var engine = obj.Engine;
     var properties = GetDeclarativeProperties(engine);
     properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable));
     properties.Add(new PropertyNameAndValue(engine.Symbol.ToStringTag, "Symbol", PropertyAttributes.Configurable));
     obj.FastSetProperties(properties);
 }
        /// <summary>
        /// Initializes the prototype properties.
        /// </summary>
        /// <param name="obj"> The object to set the properties on. </param>
        /// <param name="constructor"> A reference to the constructor that owns the prototype. </param>
        internal static void InitializePrototypeProperties(ObjectInstance obj, SymbolConstructor constructor)
        {
            var engine     = obj.Engine;
            var properties = GetDeclarativeProperties(engine);

            properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable));
            properties.Add(new PropertyNameAndValue(engine.Symbol.ToStringTag, "Symbol", PropertyAttributes.Configurable));
            obj.FastSetProperties(properties);
        }
        /// <summary>
        /// Initializes the prototype properties.
        /// </summary>
        /// <param name="obj"> The object to set the properties on. </param>
        /// <param name="constructor"> A reference to the constructor that owns the prototype. </param>
        internal static void InitializePrototypeProperties(ObjectInstance obj, FunctionConstructor constructor)
        {
            var engine     = obj.Engine;
            var properties = GetDeclarativeProperties(engine);

            properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable));
            properties.Add(new PropertyNameAndValue("name", "Empty", PropertyAttributes.Configurable));
            properties.Add(new PropertyNameAndValue("length", 0, PropertyAttributes.Configurable));
            obj.FastSetProperties(properties);
        }
 /// <summary>
 /// Initializes the prototype properties.
 /// </summary>
 /// <param name="obj"> The object to set the properties on. </param>
 /// <param name="constructor"> A reference to the constructor that owns the prototype. </param>
 internal static void InitializePrototypeProperties(ObjectInstance obj, FunctionConstructor constructor)
 {
     var engine = obj.Engine;
     var properties = GetDeclarativeProperties(engine);
     properties.Add(new PropertyNameAndValue("constructor", constructor, PropertyAttributes.NonEnumerable));
     properties.Add(new PropertyNameAndValue("name", "Empty", PropertyAttributes.Configurable));
     properties.Add(new PropertyNameAndValue("length", 0, PropertyAttributes.Configurable));
     obj.FastSetProperties(properties);
 }