示例#1
0
        /// <inheritdoc />
        public ITypeBuilder NewDefaultConstructor(MethodAttributes constructorAttributes)
        {
            var ctorBuilder = new FluentConstructorBuilder(
                (attrs) =>
            {
                return(this
                       .Define()
                       .DefineDefaultConstructor(
                           attrs));
            }
                );

            ctorBuilder.MethodAttributes = constructorAttributes;
            this.actions.Add(() => ctorBuilder.Define());
            return(this);
        }
示例#2
0
        /// <inheritdoc />
        public IConstructorBuilder NewConstructor()
        {
            var ctorBuilder = new FluentConstructorBuilder(
                (attrs,
                 calling,
                 parms,
                 required,
                 optional) =>
            {
                return(this
                       .Define()
                       .DefineConstructor(
                           attrs,
                           calling,
                           parms,
                           required,
                           optional));
            }
                );

            this.actions.Add(() => ctorBuilder.Define());
            return(ctorBuilder);
        }