public UIBuildFeedbackSink(IOutputCategory messageView, IStatusBarService statusBarService) { Debug.Assert(messageView != null); Debug.Assert(statusBarService != null); this.messageView = messageView; this.statusBarService = statusBarService; }
public void OutputCategory_MessageViewCategoryAlreadyCreated_ReturnsOutputCategoryFromMessageViewCategory() { CreateCompilerMessageView(); var messageCategoryView = new FakeMessageCategoryView(); IOutputCategory expectedCategory = MockRepository.GenerateStub <IOutputCategory>(); messageCategoryView.OutputCategory = expectedCategory; fakeCompilerMessageView.GetExistingReturnValue = messageCategoryView; CreateView(fakeCompilerMessageView); IOutputCategory outputCategory = view.OutputCategory; Assert.AreEqual(expectedCategory, outputCategory); }
public async Task <int> RunInOutputPadAsync(IOutputCategory outputCategory, string program, params string[] arguments) { RedirectStandardOutputAndErrorToSingleStream = true; Start(program, arguments); StringBuilder printedCommandLine = new StringBuilder(); if (WorkingDirectory != null) { printedCommandLine.Append(WorkingDirectory); printedCommandLine.Append("> "); } printedCommandLine.Append(CommandLine); outputCategory.AppendLine(printedCommandLine.ToString()); using (TextReader reader = OpenStandardOutputReader()) { await reader.CopyToAsync(new MessageViewCategoryTextWriter(outputCategory)); } await WaitForExitAsync(); outputCategory.AppendLine(StringParser.Parse("${res:XML.MainMenu.ToolMenu.ExternalTools.ExitedWithCode} " + this.ExitCode)); return(this.ExitCode); }
public NAntMessageViewCategoryTextWriter(IOutputCategory target) { this.target = target; this.output = new StringBuilder(); }
void IOutputPad.RemoveCategory(IOutputCategory category) { throw new NotImplementedException(); }
public Task<int> RunInOutputPadAsync(IOutputCategory outputCategory, string program, params string[] arguments) { throw new NotImplementedException(); }
public MessageViewCategoryTextWriter(IOutputCategory target) { this.target = target; }
public async Task<int> RunInOutputPadAsync(IOutputCategory outputCategory, string program, params string[] arguments) { RedirectStandardOutputAndErrorToSingleStream = true; Start(program, arguments); StringBuilder printedCommandLine = new StringBuilder(); if (WorkingDirectory != null) { printedCommandLine.Append(WorkingDirectory); printedCommandLine.Append("> "); } printedCommandLine.Append(CommandLine); outputCategory.AppendLine(printedCommandLine.ToString()); using (TextReader reader = OpenStandardOutputReader()) { await reader.CopyToAsync(new MessageViewCategoryTextWriter(outputCategory)); } await WaitForExitAsync(); outputCategory.AppendLine(StringParser.Parse("${res:XML.MainMenu.ToolMenu.ExternalTools.ExitedWithCode} " + this.ExitCode)); return this.ExitCode; }
public Task <int> RunInOutputPadAsync(IOutputCategory outputCategory, string program, params string[] arguments) { throw new NotImplementedException(); }
public virtual void WriteToOutputPad(IOutputCategory category) { category.AppendLine(this.Message); }