Example #1
0
        internal override ConstructorInfo GetConstructor(ConstructorInfo fromNoninstanciated)
        {
            initialize();

            if (ctors == null)
            {
                ctors = new Hashtable();
            }
            if (!ctors.ContainsKey(fromNoninstanciated))
            {
                ctors [fromNoninstanciated] = new ConstructorOnTypeBuilderInst(this, fromNoninstanciated);
            }
            return((ConstructorInfo)ctors [fromNoninstanciated]);
        }
Example #2
0
        internal override ConstructorInfo GetConstructor(ConstructorInfo fromNoninstanciated)
        {
            initialize();

            if (!(fromNoninstanciated is ConstructorBuilder))
            {
                throw new InvalidOperationException("Inflating non ConstructorBuilder objects is not supported: " + fromNoninstanciated.GetType());
            }

            ConstructorBuilder cb = (ConstructorBuilder)fromNoninstanciated;

            if (ctors == null)
            {
                ctors = new Hashtable();
            }
            if (!ctors.ContainsKey(cb))
            {
                ctors [cb] = new ConstructorOnTypeBuilderInst(this, cb);
            }
            return((ConstructorInfo)ctors [cb]);
        }