public int EnumOriginalCodeBlocks(out IVsEnumCodeBlocks ppEnum) { IVsTextLines buffer; ErrorHandler.ThrowOnFailure(bufferCoordinator.GetSecondaryBuffer(out buffer)); ppEnum = new CodeBlocksEnumerator(buffer); return(VSConstants.S_OK); }
/// <summary> /// Returns the list of code blocks in the generated .cs file that comes from the ASP.NET /// markup compiler. These blocks of code are delimited by #line directives (ExternSource /// directives in VB). The TextSpan that we return is the span of the lines between the /// start #line and ending #line default directives (#End ExternSource in VB), and the /// cookie is the numeric line number given in the #line directive. /// </summary> public int EnumOriginalCodeBlocks(out IVsEnumCodeBlocks ppEnum) { var waitIndicator = ComponentModel.GetService <IWaitIndicator>(); IList <TextSpanAndCookie> result = null; waitIndicator.Wait( "Intellisense", allowCancel: false, action: c => result = EnumOriginalCodeBlocksWorker(c.CancellationToken)); ppEnum = new CodeBlockEnumerator(result); return(VSConstants.S_OK); }
public int EnumOriginalCodeBlocks(out IVsEnumCodeBlocks ppEnum) { IList <TextSpanAndCookie> result = null; var uiThreadOperationExecutor = ComponentModel.GetService <IUIThreadOperationExecutor>(); uiThreadOperationExecutor.Execute( "Intellisense", defaultDescription: "", allowCancellation: false, showProgress: false, action: c => result = EnumOriginalCodeBlocksWorker(c.UserCancellationToken)); ppEnum = new CodeBlockEnumerator(result); return(VSConstants.S_OK); }
public int Clone(out IVsEnumCodeBlocks ppEnum) { ppEnum = new CodeBlocksEnumerator(this); return(VSConstants.S_OK); }
public int EnumOriginalCodeBlocks(out IVsEnumCodeBlocks ppEnum) { IVsTextLines buffer; ErrorHandler.ThrowOnFailure(bufferCoordinator.GetSecondaryBuffer(out buffer)); ppEnum = new CodeBlocksEnumerator(buffer); return VSConstants.S_OK; }
public int Clone(out IVsEnumCodeBlocks ppEnum) { ppEnum = new CodeBlockEnumerator(this); return VSConstants.S_OK; }