/// <summary> /// 构造函数。 /// </summary> /// <param name="typeEmitter">父类型。</param> /// <param name="attributes">属性。</param> public ConstructorEmitter(AbstractTypeEmitter typeEmitter, MethodAttributes attributes) : this(typeEmitter, attributes, CallingConventions.Standard) { }
/// <summary> /// 构造函数。 /// </summary> /// <param name="typeEmitter">父类型。</param> /// <param name="attributes">属性。</param> /// <param name="conventions">调用约定。</param> public ConstructorEmitter(AbstractTypeEmitter typeEmitter, MethodAttributes attributes, CallingConventions conventions) : base(typeof(void)) { this.typeEmitter = typeEmitter; Attributes = attributes; Conventions = conventions; }
/// <summary> /// 创建匿名类型的构造函数。 /// </summary> /// <param name="typeEmitter">匿名类型的所属类型。</param> /// <param name="name">匿名类型名称。</param> /// <param name="attributes">匿名函数类型。</param> /// <param name="baseType">匿名函数基类。</param> protected AbstractTypeEmitter(AbstractTypeEmitter typeEmitter, string name, TypeAttributes attributes, Type baseType) : this(typeEmitter, name, attributes, baseType, Type.EmptyTypes) { }
/// <summary> /// 创建匿名类型的构造函数。 /// </summary> /// <param name="typeEmitter">匿名类型的所属类型。</param> /// <param name="name">匿名类型名称。</param> /// <param name="attributes">匿名函数类型。</param> /// <param name="baseType">匿名函数基类。</param> /// <param name="interfaces">匿名函数实现接口。</param> protected AbstractTypeEmitter(AbstractTypeEmitter typeEmitter, string name, TypeAttributes attributes, Type baseType, Type[] interfaces) : this(DefineNestedTypeBuilder(typeEmitter.builder, name, attributes, baseType, interfaces), typeEmitter.namingScope) { typeEmitter.abstracts.Add(this); }
/// <summary> /// 创建匿名类型的构造函数。 /// </summary> /// <param name="typeEmitter">匿名类型的所属类型。</param> /// <param name="name">匿名类型名称。</param> /// <param name="attributes">匿名函数类型。</param> protected AbstractTypeEmitter(AbstractTypeEmitter typeEmitter, string name, TypeAttributes attributes) : this(typeEmitter, name, attributes, typeof(object)) { }
/// <summary> /// 创建匿名类型的构造函数。 /// </summary> /// <param name="typeEmitter">匿名类型的所属类型。</param> /// <param name="name">匿名类型名称。</param> protected AbstractTypeEmitter(AbstractTypeEmitter typeEmitter, string name) : this(typeEmitter, name, TypeAttributes.NotPublic) { }
/// <summary> /// 创建匿名类型的构造函数。 /// </summary> /// <param name="typeEmitter">匿名类型的所属类型。</param> /// <param name="name">匿名类型名称。</param> /// <param name="attributes">匿名函数类型。</param> /// <param name="baseType">匿名函数基类。</param> /// <param name="interfaces">匿名函数实现接口。</param> public NestedClassEmitter(AbstractTypeEmitter typeEmitter, string name, TypeAttributes attributes, Type baseType, Type[] interfaces) : base(typeEmitter, name, attributes, baseType, interfaces) { }
/// <summary> /// 创建匿名类型的构造函数。 /// </summary> /// <param name="typeEmitter">匿名类型的所属类型。</param> /// <param name="name">匿名类型名称。</param> /// <param name="attributes">匿名函数类型。</param> public NestedClassEmitter(AbstractTypeEmitter typeEmitter, string name, TypeAttributes attributes) : base(typeEmitter, name, attributes) { }
/// <summary> /// 创建匿名类型的构造函数。 /// </summary> /// <param name="typeEmitter">匿名类型的所属类型。</param> /// <param name="name">匿名类型名称。</param> public NestedClassEmitter(AbstractTypeEmitter typeEmitter, string name) : base(typeEmitter, name) { }