internal CompoundViewAction(IVsTextView view, string description) { opened = false; action = (IVsCompoundAction)view; if (this.action == null) { throw new ArgumentNullException("(IVsCompoundAction)view"); } NativeMethods.ThrowOnFailure(action.OpenCompoundAction(description)); opened = true; }
internal CompoundAction(ISource src, string description) { this.opened = false; this.src = src; this.action = (IVsCompoundAction)src.GetTextLines(); if (this.action == null) { throw new ArgumentNullException("(IVsCompoundAction)src.GetTextLines()"); } NativeMethods.ThrowOnFailure(action.OpenCompoundAction(description)); this.opened = true; this.colorizer = src.GetColorizer(); if (colorizer != null) colorizer.Suspend(); // batch colorization }