C# Class Microsoft.VisualStudio.Project.IdeBuildLogger

This class implements an MSBuild logger that output events to VS outputwindow and tasklist.
Inheritance: Logger, IDisposable
Exibir arquivo Open project: tunnelvisionlabs/MPFProj10

Public Methods

Method Description
Dispose ( ) : void
IdeBuildLogger ( IVsOutputWindowPane output, Microsoft.VisualStudio.Shell.TaskProvider taskProvider, IVsHierarchy hierarchy ) : System

Constructor. Initialize member data.

Initialize ( IEventSource eventSource ) : void

Overridden from the Logger class.

Protected Methods

Method Description
BeginInvokeWithErrorMessage ( IServiceProvider serviceProvider, Dispatcher dispatcher, System.Action action ) : void

Call Dispatcher.BeginInvoke, showing an error message if there was a non-critical exception.

BuildFinishedHandler ( object sender, Microsoft.Build.Framework.BuildFinishedEventArgs buildEvent ) : void

This is the delegate for BuildFinishedHandler events.

BuildStartedHandler ( object sender, Microsoft.Build.Framework.BuildStartedEventArgs buildEvent ) : void

This is the delegate for BuildStartedHandler events.

CallWithErrorMessage ( IServiceProvider serviceProvider, System.Action action ) : void

Show error message if exception is caught when invoking a method

ClearCachedVerbosity ( ) : void

Clear the cached verbosity, so that it will be re-evaluated from the build verbosity registry key.

ClearQueuedOutput ( ) : void
ClearQueuedTasks ( ) : void
CustomHandler ( object sender, Microsoft.Build.Framework.CustomBuildEventArgs buildEvent ) : void

This is the delegate for CustomHandler events.

Dispose ( bool disposing ) : void
ErrorHandler ( object sender, Microsoft.Build.Framework.BuildErrorEventArgs errorEvent ) : void

This is the delegate for error events.

GetFormattedErrorMessage ( string fileName, int line, int column, bool isWarning, string errorNumber, string errorText ) : string

Format error messages for the task list

IndentOutput ( ) : void
LogAtImportance ( MessageImportance importance ) : bool

This method takes a MessageImportance and returns if messages at importance importance should be logged. Otherwise return .

MessageHandler ( object sender, Microsoft.Build.Framework.BuildMessageEventArgs messageEvent ) : void

This is the delegate for Message event types

NavigateTo ( object sender, EventArgs arguments ) : void
ProjectFinishedHandler ( object sender, Microsoft.Build.Framework.ProjectFinishedEventArgs buildEvent ) : void

This is the delegate for ProjectFinishedHandler events.

ProjectStartedHandler ( object sender, Microsoft.Build.Framework.ProjectStartedEventArgs buildEvent ) : void

This is the delegate for ProjectStartedHandler events.

QueueOutputEvent ( MessageImportance importance, Microsoft.Build.Framework.BuildEventArgs buildEvent ) : void
QueueOutputText ( MessageImportance importance, string text ) : void
QueueOutputText ( string text ) : void
QueueTaskEvent ( Microsoft.Build.Framework.BuildEventArgs errorEvent ) : void
ReportQueuedOutput ( ) : void
ReportQueuedTasks ( ) : void
SetVerbosity ( ) : void

Sets the verbosity level.

ShowErrorMessage ( IServiceProvider serviceProvider, Exception exception ) : void

Show error window about the exception

TargetFinishedHandler ( object sender, Microsoft.Build.Framework.TargetFinishedEventArgs buildEvent ) : void

This is the delegate for TargetFinishedHandler events.

TargetStartedHandler ( object sender, Microsoft.Build.Framework.TargetStartedEventArgs buildEvent ) : void

This is the delegate for TargetStartedHandler events.

TaskFinishedHandler ( object sender, Microsoft.Build.Framework.TaskFinishedEventArgs buildEvent ) : void

This is the delegate for TaskFinishedHandler events.

TaskStartedHandler ( object sender, Microsoft.Build.Framework.TaskStartedEventArgs buildEvent ) : void

This is the delegate for TaskStartedHandler events.

UnindentOutput ( ) : void
WarningHandler ( object sender, Microsoft.Build.Framework.BuildWarningEventArgs warningEvent ) : void

This is the delegate for warning events.

Method Details

BeginInvokeWithErrorMessage() protected static method

Call Dispatcher.BeginInvoke, showing an error message if there was a non-critical exception.
protected static BeginInvokeWithErrorMessage ( IServiceProvider serviceProvider, Dispatcher dispatcher, System.Action action ) : void
serviceProvider IServiceProvider service provider
dispatcher System.Windows.Threading.Dispatcher dispatcher
action System.Action action to invoke
return void

BuildFinishedHandler() protected method

This is the delegate for BuildFinishedHandler events.
protected BuildFinishedHandler ( object sender, Microsoft.Build.Framework.BuildFinishedEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.BuildFinishedEventArgs
return void

BuildStartedHandler() protected method

This is the delegate for BuildStartedHandler events.
protected BuildStartedHandler ( object sender, Microsoft.Build.Framework.BuildStartedEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.BuildStartedEventArgs
return void

CallWithErrorMessage() protected static method

Show error message if exception is caught when invoking a method
protected static CallWithErrorMessage ( IServiceProvider serviceProvider, System.Action action ) : void
serviceProvider IServiceProvider service provider
action System.Action action to invoke
return void

ClearCachedVerbosity() protected method

Clear the cached verbosity, so that it will be re-evaluated from the build verbosity registry key.
protected ClearCachedVerbosity ( ) : void
return void

ClearQueuedOutput() protected method

protected ClearQueuedOutput ( ) : void
return void

ClearQueuedTasks() protected method

protected ClearQueuedTasks ( ) : void
return void

CustomHandler() protected method

This is the delegate for CustomHandler events.
protected CustomHandler ( object sender, Microsoft.Build.Framework.CustomBuildEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.CustomBuildEventArgs
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

ErrorHandler() protected method

This is the delegate for error events.
protected ErrorHandler ( object sender, Microsoft.Build.Framework.BuildErrorEventArgs errorEvent ) : void
sender object
errorEvent Microsoft.Build.Framework.BuildErrorEventArgs
return void

GetFormattedErrorMessage() protected method

Format error messages for the task list
protected GetFormattedErrorMessage ( string fileName, int line, int column, bool isWarning, string errorNumber, string errorText ) : string
fileName string
line int
column int
isWarning bool
errorNumber string
errorText string
return string

IdeBuildLogger() public method

Constructor. Initialize member data.
public IdeBuildLogger ( IVsOutputWindowPane output, Microsoft.VisualStudio.Shell.TaskProvider taskProvider, IVsHierarchy hierarchy ) : System
output IVsOutputWindowPane
taskProvider Microsoft.VisualStudio.Shell.TaskProvider
hierarchy IVsHierarchy
return System

IndentOutput() protected method

protected IndentOutput ( ) : void
return void

Initialize() public method

Overridden from the Logger class.
public Initialize ( IEventSource eventSource ) : void
eventSource IEventSource
return void

LogAtImportance() protected method

This method takes a MessageImportance and returns if messages at importance importance should be logged. Otherwise return .
protected LogAtImportance ( MessageImportance importance ) : bool
importance MessageImportance
return bool

MessageHandler() protected method

This is the delegate for Message event types
protected MessageHandler ( object sender, Microsoft.Build.Framework.BuildMessageEventArgs messageEvent ) : void
sender object
messageEvent Microsoft.Build.Framework.BuildMessageEventArgs
return void

NavigateTo() protected method

protected NavigateTo ( object sender, EventArgs arguments ) : void
sender object
arguments System.EventArgs
return void

ProjectFinishedHandler() protected method

This is the delegate for ProjectFinishedHandler events.
protected ProjectFinishedHandler ( object sender, Microsoft.Build.Framework.ProjectFinishedEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.ProjectFinishedEventArgs
return void

ProjectStartedHandler() protected method

This is the delegate for ProjectStartedHandler events.
protected ProjectStartedHandler ( object sender, Microsoft.Build.Framework.ProjectStartedEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.ProjectStartedEventArgs
return void

QueueOutputEvent() protected method

protected QueueOutputEvent ( MessageImportance importance, Microsoft.Build.Framework.BuildEventArgs buildEvent ) : void
importance MessageImportance
buildEvent Microsoft.Build.Framework.BuildEventArgs
return void

QueueOutputText() protected method

protected QueueOutputText ( MessageImportance importance, string text ) : void
importance MessageImportance
text string
return void

QueueOutputText() protected method

protected QueueOutputText ( string text ) : void
text string
return void

QueueTaskEvent() protected method

protected QueueTaskEvent ( Microsoft.Build.Framework.BuildEventArgs errorEvent ) : void
errorEvent Microsoft.Build.Framework.BuildEventArgs
return void

ReportQueuedOutput() protected method

protected ReportQueuedOutput ( ) : void
return void

ReportQueuedTasks() protected method

protected ReportQueuedTasks ( ) : void
return void

SetVerbosity() protected method

Sets the verbosity level.
protected SetVerbosity ( ) : void
return void

ShowErrorMessage() protected static method

Show error window about the exception
protected static ShowErrorMessage ( IServiceProvider serviceProvider, Exception exception ) : void
serviceProvider IServiceProvider service provider
exception System.Exception exception
return void

TargetFinishedHandler() protected method

This is the delegate for TargetFinishedHandler events.
protected TargetFinishedHandler ( object sender, Microsoft.Build.Framework.TargetFinishedEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.TargetFinishedEventArgs
return void

TargetStartedHandler() protected method

This is the delegate for TargetStartedHandler events.
protected TargetStartedHandler ( object sender, Microsoft.Build.Framework.TargetStartedEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.TargetStartedEventArgs
return void

TaskFinishedHandler() protected method

This is the delegate for TaskFinishedHandler events.
protected TaskFinishedHandler ( object sender, Microsoft.Build.Framework.TaskFinishedEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.TaskFinishedEventArgs
return void

TaskStartedHandler() protected method

This is the delegate for TaskStartedHandler events.
protected TaskStartedHandler ( object sender, Microsoft.Build.Framework.TaskStartedEventArgs buildEvent ) : void
sender object
buildEvent Microsoft.Build.Framework.TaskStartedEventArgs
return void

UnindentOutput() protected method

protected UnindentOutput ( ) : void
return void

WarningHandler() protected method

This is the delegate for warning events.
protected WarningHandler ( object sender, Microsoft.Build.Framework.BuildWarningEventArgs warningEvent ) : void
sender object
warningEvent Microsoft.Build.Framework.BuildWarningEventArgs
return void