Jurassic.Library.ClrFunction.ClrFunction C# (CSharp) Method

ClrFunction() private method

Creates a new instance of a function which calls the given binder.
private ClrFunction ( ObjectInstance prototype, Binder binder ) : System
prototype ObjectInstance The next object in the prototype chain.
binder Jurassic.Compiler.Binder An object representing a collection of methods to bind to.
return System
        internal ClrFunction(ObjectInstance prototype, Binder binder)
            : base(prototype)
        {
            this.callBinder = binder;

            // Add function properties.
            this.FastSetProperty("name", binder.Name, PropertyAttributes.Configurable);
            this.FastSetProperty("length", binder.FunctionLength, PropertyAttributes.Configurable);
            //this.FastSetProperty("prototype", this.Engine.Object.Construct());
            //this.InstancePrototype.FastSetProperty("constructor", this, PropertyAttributes.NonEnumerable);
        }

Same methods

ClrFunction::ClrFunction ( ObjectInstance prototype, Delegate delegateToCall, string name = null, int length = -1 ) : System
ClrFunction::ClrFunction ( ObjectInstance prototype, IEnumerable methods, string name = null, int length = -1 ) : System
ClrFunction::ClrFunction ( ObjectInstance prototype, string name, ObjectInstance instancePrototype ) : System