コード例 #1
0
ファイル: FileCodeModel.cs プロジェクト: smartmobili/parsing
 public CodeDomFileCodeModel(DTE dte, IVsTextLines buffer, CodeDomProvider provider, string moniker)
     : base(dte, moniker)
 {
     this.textBuffer = buffer;
     this.provider = provider as IMergableProvider;
     if (provider == null) throw new ArgumentException("provider must implement IMergeableProvider interface");
 }
コード例 #2
0
ファイル: FileCodeModel.cs プロジェクト: smartmobili/parsing
        private CodeDomCodeNamespace vsTopNamespace; // top-level CodeModel namespace

        #endregion Fields

        #region Constructors

        public CodeDomFileCodeModel(DTE dte, ProjectItem parent, CodeDomProvider provider, string filename)
            : base(dte, filename)
        {
            this.parent = parent;
            this.provider = provider as IMergableProvider;
            if (provider == null) throw new ArgumentException("provider must implement IMergeableProvider interface");
        }
コード例 #3
0
 public CodeDomFileCodeModel(DTE dte, ProjectItem parent, CodeDomProvider provider, string filename) : base(dte, filename)
 {
     this.parent   = parent;
     this.provider = provider as IMergableProvider;
     if (provider == null)
     {
         throw new ArgumentException("provider must implement IMergeableProvider interface");
     }
 }
コード例 #4
0
 public CodeDomFileCodeModel(DTE dte, IVsTextLines buffer, CodeDomProvider provider, string moniker) : base(dte, moniker)
 {
     this.textBuffer = buffer;
     this.provider   = provider as IMergableProvider;
     if (provider == null)
     {
         throw new ArgumentException("provider must implement IMergeableProvider interface");
     }
 }
コード例 #5
0
        internal void CommitChanges()
        {
            IMergableProvider prov = provider as IMergableProvider;

            if (prov == null)
            {
                throw new InvalidOperationException("provider must be mergable");
            }

            DTE.UndoContext.Open("Undo Code Merge", false);
            committing = true;
            try {
                prov.MergeCodeFromCompileUnit(ccu);
            } finally {
                committing = false;
                DTE.UndoContext.Close();
            }
        }