示例#1
0
 /// <summary>
 /// Add a new prototype.
 /// </summary>
 internal void Add(JsPrototype prototype)
 {
     if (!Prototypes.Contains(prototype))
     {
         Prototypes.Add(prototype);
     }
 }
示例#2
0
        /// <summary>
        /// Create a new js class with the specified parameters.
        /// </summary>
        protected JsClass(params Js[] parameters)
        {
            _parameters = parameters;
            var type = this.GetType();

            if (!_definitions.TryGetValue(type, out Prototype))
            {
                Prototype = new JsPrototype(this);
                _definitions.Add(type, Prototype);
            }
        }