System.Xml.Xsl.Runtime.XmlQueryRuntime.GetEarlyBoundObject C# (CSharp) Method

GetEarlyBoundObject() public method

Get the early-bound extension object identified by "index". If it does not yet exist, create an instance using the corresponding ConstructorInfo.
public GetEarlyBoundObject ( int index ) : object
index int
return object
        public object GetEarlyBoundObject(int index) {
            object obj;
            Debug.Assert(this.earlyObjects != null && index < this.earlyObjects.Length, "Early bound object does not exist");

            obj = this.earlyObjects[index];
            if (obj == null) {
                // Early-bound object does not yet exist, so create it now
                obj = this.earlyInfo[index].CreateObject();
                this.earlyObjects[index] = obj;
            }

            return obj;
        }