コード例 #1
0
        private CodeTypeDelegate GenerateTypedRowEventHandler(DesignTable table)
        {
            CodeTypeDelegate delegate2;

            if (table == null)
            {
                throw new InternalException("DesignTable should not be null.");
            }
            string generatorRowClassName = table.GeneratorRowClassName;

            delegate2 = new CodeTypeDelegate(table.GeneratorRowEvHandlerName)
            {
                TypeAttributes = delegate2.TypeAttributes | TypeAttributes.Public
            };
            delegate2.Parameters.Add(CodeGenHelper.ParameterDecl(CodeGenHelper.GlobalType(typeof(object)), "sender"));
            delegate2.Parameters.Add(CodeGenHelper.ParameterDecl(CodeGenHelper.Type(table.GeneratorRowEvArgName), "e"));
            delegate2.CustomAttributes.Add(CodeGenHelper.GeneratedCodeAttributeDecl());
            return(delegate2);
        }