C# Class Microsoft.VisualStudio.Project.IdeBuildLogger

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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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
Résultat void

BuildFinishedHandler() protected méthode

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

BuildStartedHandler() protected méthode

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

CallWithErrorMessage() protected static méthode

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
Résultat void

ClearCachedVerbosity() protected méthode

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

ClearQueuedOutput() protected méthode

protected ClearQueuedOutput ( ) : void
Résultat void

ClearQueuedTasks() protected méthode

protected ClearQueuedTasks ( ) : void
Résultat void

CustomHandler() protected méthode

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

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

ErrorHandler() protected méthode

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

GetFormattedErrorMessage() protected méthode

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
Résultat string

IdeBuildLogger() public méthode

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
Résultat System

IndentOutput() protected méthode

protected IndentOutput ( ) : void
Résultat void

Initialize() public méthode

Overridden from the Logger class.
public Initialize ( IEventSource eventSource ) : void
eventSource IEventSource
Résultat void

LogAtImportance() protected méthode

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

MessageHandler() protected méthode

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
Résultat void

NavigateTo() protected méthode

protected NavigateTo ( object sender, EventArgs arguments ) : void
sender object
arguments System.EventArgs
Résultat void

ProjectFinishedHandler() protected méthode

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

ProjectStartedHandler() protected méthode

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

QueueOutputEvent() protected méthode

protected QueueOutputEvent ( MessageImportance importance, Microsoft.Build.Framework.BuildEventArgs buildEvent ) : void
importance MessageImportance
buildEvent Microsoft.Build.Framework.BuildEventArgs
Résultat void

QueueOutputText() protected méthode

protected QueueOutputText ( MessageImportance importance, string text ) : void
importance MessageImportance
text string
Résultat void

QueueOutputText() protected méthode

protected QueueOutputText ( string text ) : void
text string
Résultat void

QueueTaskEvent() protected méthode

protected QueueTaskEvent ( Microsoft.Build.Framework.BuildEventArgs errorEvent ) : void
errorEvent Microsoft.Build.Framework.BuildEventArgs
Résultat void

ReportQueuedOutput() protected méthode

protected ReportQueuedOutput ( ) : void
Résultat void

ReportQueuedTasks() protected méthode

protected ReportQueuedTasks ( ) : void
Résultat void

SetVerbosity() protected méthode

Sets the verbosity level.
protected SetVerbosity ( ) : void
Résultat void

ShowErrorMessage() protected static méthode

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

TargetFinishedHandler() protected méthode

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

TargetStartedHandler() protected méthode

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

TaskFinishedHandler() protected méthode

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

TaskStartedHandler() protected méthode

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

UnindentOutput() protected méthode

protected UnindentOutput ( ) : void
Résultat void

WarningHandler() protected méthode

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