Bagikan melalui


TaskLoggingHelperExtension Class

Definition

Helper logging class for tasks, used for dealing with two resource streams.

This API supports the product infrastructure and is not intended to be used directly from your code.

public ref class TaskLoggingHelperExtension : Microsoft::Build::Utilities::TaskLoggingHelper
public class TaskLoggingHelperExtension : Microsoft.Build.Utilities.TaskLoggingHelper
type TaskLoggingHelperExtension = class
    inherit TaskLoggingHelper
Public Class TaskLoggingHelperExtension
Inherits TaskLoggingHelper
Inheritance
TaskLoggingHelperExtension
Inheritance
TaskLoggingHelperExtension

Constructors

TaskLoggingHelperExtension(ITask, ResourceManager, ResourceManager, String)

This API supports the product infrastructure and is not intended to be used directly from your code.

public constructor

Properties

BuildEngine

Shortcut property for getting our build engine - we retrieve it from the task instance

(Inherited from TaskLoggingHelper)
HasLoggedErrors

Has the task logged any errors through this logging helper object?

(Inherited from TaskLoggingHelper)
HelpKeywordPrefix

Gets or sets the prefix used to compose help keywords from string resource names.

(Inherited from TaskLoggingHelper)
IsTaskInputLoggingEnabled

Returns true if the build is configured to log all task inputs.

(Inherited from TaskLoggingHelper)
TaskName

Gets the name of the parent task.

(Inherited from TaskLoggingHelper)
TaskResources

Used to load culture-specific resources. Derived classes should register their resources either during construction, or via this property, if they have localized strings.

(Inherited from TaskLoggingHelper)
TaskSharedResources

This API supports the product infrastructure and is not intended to be used directly from your code.

Used to load culture-specific resources. Derived classes should register their resources either during construction, or via this property, if they have localized strings.

Methods

ExtractMessageCode(String, String)

Extracts the message code (if any) prefixed to the given message string. Message code prefixes must match the following .NET regular expression in order to be recognized: ^\s*[A-Za-z]+\d+:\s* Thread safe.

(Inherited from TaskLoggingHelper)
FormatResourceString(String, Object[])

This API supports the product infrastructure and is not intended to be used directly from your code.

Loads the specified resource string and optionally formats it using the given arguments. The current thread's culture is used for formatting.

FormatString(String, Object[])

Formats the given string using the variable arguments passed in. The current thread's culture is used for formatting. Thread safe.

(Inherited from TaskLoggingHelper)
GetResourceMessage(String)

Get the message from resource in task library. Thread safe.

(Inherited from TaskLoggingHelper)
InitializeLifetimeService()

InitializeLifetimeService is called when the remote object is activated. This method will determine how long the lifetime for the object will be. Thread safe. However, InitializeLifetimeService and MarkAsInactive should only be called in that order, together or not at all, and no more than once.

(Inherited from TaskLoggingHelper)
LogCommandLine(MessageImportance, String)

Logs the command line for a task's underlying tool/executable/shell command, using the given importance level. Thread safe.

(Inherited from TaskLoggingHelper)
LogCommandLine(String)

Logs the command line for a task's underlying tool/executable/shell command. Thread safe.

(Inherited from TaskLoggingHelper)
LogCriticalMessage(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs a critical message using the specified string and other message details. Thread safe.

(Inherited from TaskLoggingHelper)
LogError(String, Object[])

Logs an error using the specified string. Thread safe.

(Inherited from TaskLoggingHelper)
LogError(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs an error using the specified string and other error details. Thread safe.

(Inherited from TaskLoggingHelper)
LogError(String, String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs an error using the specified string and other error details. Thread safe.

(Inherited from TaskLoggingHelper)
LogErrorFromException(Exception, Boolean, Boolean, String)

Logs an error using the message, and optionally the stack-trace from the given exception, and optionally inner exceptions too. Thread safe.

(Inherited from TaskLoggingHelper)
LogErrorFromException(Exception, Boolean)

Logs an error using the message (and optionally the stack-trace) from the given exception context. Thread safe.

(Inherited from TaskLoggingHelper)
LogErrorFromException(Exception)

Logs an error using the message from the given exception context. No callstack will be shown. Thread safe.

(Inherited from TaskLoggingHelper)
LogErrorFromResources(String, Object[])

Logs an error using the specified resource string. Thread safe.

(Inherited from TaskLoggingHelper)
LogErrorFromResources(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs an error using the specified resource string and other error details. Thread safe.

(Inherited from TaskLoggingHelper)
LogErrorWithCodeFromResources(String, Object[])

Logs an error using the specified resource string. If the message has an error code prefixed to it, the code is extracted and logged with the message. If a help keyword prefix has been provided, a help keyword for the host IDE is also logged with the message. The help keyword is composed by appending the string resource name to the prefix.

A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.

Thread safe.

(Inherited from TaskLoggingHelper)
LogErrorWithCodeFromResources(String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs an error using the specified resource string and other error details. If the message has an error code prefixed, the code is extracted and logged with the message. If a help keyword prefix has been provided, a help keyword for the host IDE is also logged with the message. The help keyword is composed by appending the error message resource string name to the prefix.

A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.

Thread safe.

(Inherited from TaskLoggingHelper)
LogExternalProjectFinished(String, String, String, Boolean)

Small helper for logging the custom ExternalProjectFinished build event. Thread safe.

(Inherited from TaskLoggingHelper)
LogExternalProjectStarted(String, String, String, String)

Small helper for logging the custom ExternalProjectStarted build event Thread safe.

(Inherited from TaskLoggingHelper)
LogIncludeGeneratedFile(String, String)

Logs a file generated from the given data.

(Inherited from TaskLoggingHelper)
LogMessage(MessageImportance, String, Object[])

Logs a message of the given importance using the specified string. Thread safe.

(Inherited from TaskLoggingHelper)
LogMessage(String, Object[])

Logs a message using the specified string. Thread safe.

(Inherited from TaskLoggingHelper)
LogMessage(String, String, String, String, Int32, Int32, Int32, Int32, MessageImportance, String, Object[])

Logs a message using the specified string and other message details. Thread safe.

(Inherited from TaskLoggingHelper)
LogMessageFromResources(MessageImportance, String, Object[])

Logs a message of the given importance using the specified resource string. Thread safe.

(Inherited from TaskLoggingHelper)
LogMessageFromResources(String, Object[])

Logs a message using the specified resource string. Thread safe.

(Inherited from TaskLoggingHelper)
LogMessageFromText(String, MessageImportance)

Logs an error/warning/message from the given line of text. Errors/warnings are only logged for lines that fit a particular (canonical) format -- all other lines are treated as messages. Thread safe.

(Inherited from TaskLoggingHelper)
LogMessagesFromFile(String, MessageImportance)

Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that fit a particular (canonical) format -- the remaining lines are treated as messages. Thread safe.

(Inherited from TaskLoggingHelper)
LogMessagesFromFile(String)

Logs errors/warnings/messages for each line of text in the given file. Errors/warnings are only logged for lines that fit a particular (canonical) format -- the remaining lines are treated as messages. Thread safe.

(Inherited from TaskLoggingHelper)
LogMessagesFromStream(TextReader, MessageImportance)

Logs errors/warnings/messages for each line of text in the given stream. Errors/warnings are only logged for lines that fit a particular (canonical) format -- the remaining lines are treated as messages. Thread safe.

(Inherited from TaskLoggingHelper)
LogsMessagesOfImportance(MessageImportance)

Returns true if a message of given importance should be logged because it is possible that a logger consuming it exists.

(Inherited from TaskLoggingHelper)
LogTelemetry(String, IDictionary<String,String>)

Logs telemetry with the specified event name and properties.

(Inherited from TaskLoggingHelper)
LogWarning(String, Object[])

Logs a warning using the specified string. Thread safe.

(Inherited from TaskLoggingHelper)
LogWarning(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs a warning using the specified string and other warning details. Thread safe.

(Inherited from TaskLoggingHelper)
LogWarning(String, String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs a warning using the specified string and other warning details. Thread safe.

(Inherited from TaskLoggingHelper)
LogWarningFromException(Exception, Boolean)

Logs a warning using the message (and optionally the stack-trace) from the given exception context. Thread safe.

(Inherited from TaskLoggingHelper)
LogWarningFromException(Exception)

Logs a warning using the message from the given exception context. Thread safe.

(Inherited from TaskLoggingHelper)
LogWarningFromResources(String, Object[])

Logs a warning using the specified resource string. Thread safe.

(Inherited from TaskLoggingHelper)
LogWarningFromResources(String, String, String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs a warning using the specified resource string and other warning details. Thread safe.

(Inherited from TaskLoggingHelper)
LogWarningWithCodeFromResources(String, Object[])

Logs a warning using the specified resource string. If the message has a warning code prefixed to it, the code is extracted and logged with the message. If a help keyword prefix has been provided, a help keyword for the host IDE is also logged with the message. The help keyword is composed by appending the string resource name to the prefix.

A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.

Thread safe.

(Inherited from TaskLoggingHelper)
LogWarningWithCodeFromResources(String, String, Int32, Int32, Int32, Int32, String, Object[])

Logs a warning using the specified resource string and other warning details. If the message has a warning code, the code is extracted and logged with the message. If a help keyword prefix has been provided, a help keyword for the host IDE is also logged with the message. The help keyword is composed by appending the warning message resource string name to the prefix.

A task can provide a help keyword prefix either via the Task (or TaskMarshalByRef) base class constructor, or the Task.HelpKeywordPrefix (or AppDomainIsolatedTask.HelpKeywordPrefix) property.

Thread safe.

(Inherited from TaskLoggingHelper)
MarkAsInactive()

Notifies this object that its work is done. Thread safe. However, InitializeLifetimeService and MarkAsInactive should only be called in that order, together or not at all, and no more than once.

(Inherited from TaskLoggingHelper)

Applies to