Esempio n. 1
0
        /// <summary>
        /// Constructs an instance of the class with the specified parameters.
        /// </summary>
        /// <param name="args">The parameters passed to the constructor.</param>
        /// <returns>The created instance of the class.</returns>
        public override IScriptObject Construct(List <IScriptObject> args)
        {
            var ins = new NativeInstance(this);
            var sup = Super as ScriptClass;

            if (Constructor != null)
            {
                Constructor.Invoke(ins, args);
            }
            return(ins);
        }
Esempio n. 2
0
 /// <summary>
 /// Invokes theconstructor on the specified target with the specified parameters and returns the value.
 /// </summary>
 /// <param name="target">The target on which the constructor is invoked.</param>
 /// <param name="args">The parameters passed to the constructor.</param>
 public void Invoke(NativeInstance target, List <IScriptObject> args)
 {
     Action(target, args);
 }