// Get the token for a constructor within this module. Returns // a member reference if the constructor is in another assembly. public MethodToken GetConstructorToken(ConstructorInfo con) { if (con == null) { throw new ArgumentNullException("con"); } else if (con is ConstructorBuilder) { ConstructorBuilder cb = (con as ConstructorBuilder); if (cb.type.module == this) { return(cb.GetToken()); } } else if (con is ClrConstructor) { lock (typeof(AssemblyBuilder)) { return(new MethodToken (TypeBuilder.ClrTypeImportMember (privateData, ((ClrConstructor)con).ClrHandle))); } } throw new InvalidOperationException(_("Emit_CannotImportItem")); }