/// <include file='doc\ExpansionProvider.uex' path='docs/doc[@for="ExpansionProvider.ExpansionProvider"]/*' /> public ExpansionProvider(Source src) { if (src == null){ throw new ArgumentNullException("src"); } this.fieldDefaults = new ArrayList(); if (src == null) throw new System.ArgumentNullException(); this.source = src; this.vsExpansion = null; // do we need a Close() method here? // QI for IVsExpansion IVsTextLines buffer = src.GetTextLines(); this.vsExpansion = (IVsExpansion)buffer; if (this.vsExpansion == null) { throw new ArgumentNullException("(IVsExpansion)src.GetTextLines()"); } }
public virtual void CloseSource(Source source){ object key = source.GetTextLines(); if (this.sources.Contains(key)){ this.sources.Remove(key); } source.Close(); }
/// <include file='doc\Source.uex' path='docs/doc[@for="CompoundAction.CompoundAction2"]/*' /> public CompoundAction(Source src, string description) : base() { 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 }