示例#1
0
        public override void CreateMember(TypeGenerator generator)
        {
            var parameters     = Parameters.Map(para => para.GetParameterInfo(generator.Context));
            var parameterTypes = parameters.Map(para => para.Type);
            var ctor           = generator.Builder.DefineConstructor(GetAttributes(), System.Reflection.CallingConventions.Standard, parameterTypes);
            var ctorGen        = new ConstructorGenerator(ctor, parameters, generator)
            {
                SyntaxBody = Body
            };

            generator.Add(ctorGen);
        }