コード例 #1
0
        public override void Generate()
        {
            foreach (var item in GetListSP())
            {
                var template       = new ComplexTypesSPGeneratedTemplate(_model, item);
                var fullParentName = RELATIVE_OUTPUT_LOCATION + template.ParentItemName;
                var eventArgs      = new ProjectItemGeneratedEventArgs(template.FileName, template.FileContent, ProjectName, fullParentName, this, true);
                OnProjectItemGenerated(this, eventArgs);
            }

            foreach (var item in GetListFunc())
            {
                var template       = new ComplexTypesFuncGeneratedTemplate(_model, item);
                var fullParentName = RELATIVE_OUTPUT_LOCATION + template.ParentItemName;
                var eventArgs      = new ProjectItemGeneratedEventArgs(template.FileName, template.FileContent, ProjectName, fullParentName, this, true);
                OnProjectItemGenerated(this, eventArgs);
            }

            //Process deleted items
            foreach (var name in _model.RemovedStoredProcedures)
            {
                var fullFileName = RELATIVE_OUTPUT_LOCATION + name + ".Generated.cs";
                var eventArgs    = new ProjectItemDeletedEventArgs(fullFileName, ProjectName, this);
                OnProjectItemDeleted(this, eventArgs);
            }

            //Process deleted items
            foreach (var name in _model.RemovedFunctions)
            {
                var fullFileName = RELATIVE_OUTPUT_LOCATION + name + ".Generated.cs";
                var eventArgs    = new ProjectItemDeletedEventArgs(fullFileName, ProjectName, this);
                OnProjectItemDeleted(this, eventArgs);
            }

            var gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);

            OnGenerationComplete(this, gcEventArgs);
        }
コード例 #2
0
        public override void Generate()
        {
            foreach (var item in GetListSP())
            {
                var template = new ComplexTypesSPGeneratedTemplate(_model, item);
                var fullParentName = RELATIVE_OUTPUT_LOCATION + template.ParentItemName;
                var eventArgs = new ProjectItemGeneratedEventArgs(template.FileName, template.FileContent, ProjectName, fullParentName, this, true);
                OnProjectItemGenerated(this, eventArgs);
            }

            foreach (var item in GetListFunc())
            {
                var template = new ComplexTypesFuncGeneratedTemplate(_model, item);
                var fullParentName = RELATIVE_OUTPUT_LOCATION + template.ParentItemName;
                var eventArgs = new ProjectItemGeneratedEventArgs(template.FileName, template.FileContent, ProjectName, fullParentName, this, true);
                OnProjectItemGenerated(this, eventArgs);
            }

            //Process deleted items
            foreach (var name in _model.RemovedStoredProcedures)
            {
                var fullFileName = RELATIVE_OUTPUT_LOCATION + name + ".Generated.cs";
                var eventArgs = new ProjectItemDeletedEventArgs(fullFileName, ProjectName, this);
                OnProjectItemDeleted(this, eventArgs);
            }

            //Process deleted items
            foreach (var name in _model.RemovedFunctions)
            {
                var fullFileName = RELATIVE_OUTPUT_LOCATION + name + ".Generated.cs";
                var eventArgs = new ProjectItemDeletedEventArgs(fullFileName, ProjectName, this);
                OnProjectItemDeleted(this, eventArgs);
            }

            var gcEventArgs = new ProjectItemGenerationCompleteEventArgs(this);
            OnGenerationComplete(this, gcEventArgs);
        }