C# Class NAnt.Core.XmlLogger

Inheritance: IBuildLogger, ISerializable
显示文件 Open project: skolima/NAnt Class Usage Examples

Public Methods

Method Description
BuildFinished ( object sender, BuildEventArgs e ) : void

Signals that the last target has finished.

This event will still be fired if an error occurred during the build.

BuildStarted ( object sender, BuildEventArgs e ) : void

Signals that a build has started.

This event is fired before any targets have started.

Flush ( ) : void

Flushes buffered build events or messages to the underlying storage.

GetObjectData ( SerializationInfo info, StreamingContext context ) : void

Populates info with the data needed to serialize the XmlLogger instance.

IsJustWhiteSpace ( string message ) : bool
MessageLogged ( object sender, BuildEventArgs e ) : void

Signals that a message has been logged.

Only messages with a priority higher or equal to the threshold of the logger will actually be output in the build log.

StripFormatting ( string message ) : string
TargetFinished ( object sender, BuildEventArgs e ) : void

Signals that a target has finished.

This event will still be fired if an error occurred during the build.

TargetStarted ( object sender, BuildEventArgs e ) : void

Signals that a target has started.

TaskFinished ( object sender, BuildEventArgs e ) : void

Signals that a task has finished.

This event will still be fired if an error occurred during the build.

TaskStarted ( object sender, BuildEventArgs e ) : void

Signals that a task has started.

ToString ( ) : string

Returns the contents of log captured.

XmlLogger ( ) : System

Initializes a new instance of the XmlLogger class.

XmlLogger ( StopWatchStack stopWatchStack ) : System

Protected Methods

Method Description
XmlLogger ( SerializationInfo info, StreamingContext context ) : System

Initializes a new instance of the XmlLogger class with serialized data.

Private Methods

Method Description
IsValidXml ( string message ) : bool
StripCData ( string message ) : string
WriteDuration ( ) : void
WriteErrorNode ( Exception exception ) : void
WriteNameAttribute ( string name ) : void

Method Details

BuildFinished() public method

Signals that the last target has finished.
This event will still be fired if an error occurred during the build.
public BuildFinished ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

BuildStarted() public method

Signals that a build has started.
This event is fired before any targets have started.
public BuildStarted ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

Flush() public method

Flushes buffered build events or messages to the underlying storage.
public Flush ( ) : void
return void

GetObjectData() public method

Populates info with the data needed to serialize the XmlLogger instance.
public GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info System.Runtime.Serialization.SerializationInfo The to populate with data.
context System.Runtime.Serialization.StreamingContext The destination for this serialization.
return void

IsJustWhiteSpace() public method

public IsJustWhiteSpace ( string message ) : bool
message string
return bool

MessageLogged() public method

Signals that a message has been logged.
Only messages with a priority higher or equal to the threshold of the logger will actually be output in the build log.
public MessageLogged ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

StripFormatting() public method

public StripFormatting ( string message ) : string
message string
return string

TargetFinished() public method

Signals that a target has finished.
This event will still be fired if an error occurred during the build.
public TargetFinished ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

TargetStarted() public method

Signals that a target has started.
public TargetStarted ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

TaskFinished() public method

Signals that a task has finished.
This event will still be fired if an error occurred during the build.
public TaskFinished ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

TaskStarted() public method

Signals that a task has started.
public TaskStarted ( object sender, BuildEventArgs e ) : void
sender object The source of the event.
e BuildEventArgs A object that contains the event data.
return void

ToString() public method

Returns the contents of log captured.
public ToString ( ) : string
return string

XmlLogger() public method

Initializes a new instance of the XmlLogger class.
public XmlLogger ( ) : System
return System

XmlLogger() protected method

Initializes a new instance of the XmlLogger class with serialized data.
protected XmlLogger ( SerializationInfo info, StreamingContext context ) : System
info System.Runtime.Serialization.SerializationInfo The that holds the serialized object data.
context System.Runtime.Serialization.StreamingContext The that contains contextual information about the source or destination.
return System

XmlLogger() public method

public XmlLogger ( StopWatchStack stopWatchStack ) : System
stopWatchStack NAnt.Core.Util.StopWatchStack
return System