Export (0) Print
Expand All

BuildEventContext Class

Provides contextual location information for build events.

System.Object
  Microsoft.Build.Framework.BuildEventContext

Namespace:  Microsoft.Build.Framework
Assembly:  Microsoft.Build.Framework (in Microsoft.Build.Framework.dll)

[SerializableAttribute]
public class BuildEventContext

The BuildEventContext type exposes the following members.

  NameDescription
Public methodBuildEventContext(Int32, Int32, Int32, Int32)Initializes a new instance of the BuildEventContext class.
Public methodBuildEventContext(Int32, Int32, Int32, Int32, Int32)Constructs a BuildEventContext with a specified project instance id.
Public methodBuildEventContext(Int32, Int32, Int32, Int32, Int32, Int32)Constructs a BuildEventContext with a specific submission id
Top

  NameDescription
Public propertyBuildRequestIdRetrieves the BuildRequest id. Note that this is not the same as the global request id on a BuildRequest or BuildResult.
Public propertyStatic memberInvalidGets whether the context where the event occurred is valid.
Public propertyNodeIdGets the node ID where the event occurred.
Public propertyProjectContextIdGets the ID of the project where the event occurred.
Public propertyProjectInstanceIdRetrieves the project instance id.
Public propertySubmissionIdRetrieves the Submission id.
Public propertyTargetIdGets the ID of the target where the event occurred.
Public propertyTaskIdGets the ID of the task where the event occurred.
Top

  NameDescription
Public methodEqualsGets whether the references are the same. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeGets a code comprised of the ProjectContextId and the NodeId. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public operatorStatic memberEqualityOverride == so the equals comparison using this operator will be the same as .Equals
Public operatorStatic memberInequalityOverride != so the equals comparison using this operator will be the same as ! Equals
Top

  NameDescription
Public fieldStatic memberInvalidNodeIdThe node ID of the target the event was in when the event was triggered.
Public fieldStatic memberInvalidProjectContextIdThe project ID of the target the event was in when the event was triggered.
Public fieldStatic memberInvalidProjectInstanceIdThe project instance ID of the target the event was in when the event was triggered.
Public fieldStatic memberInvalidSubmissionIdThe submission ID of the target the event was in when the event was triggered.
Public fieldStatic memberInvalidTargetIdThe name of the target the event was in when the event was triggered.
Public fieldStatic memberInvalidTaskIdThe task ID of the target the event was in when the event was triggered.
Top

BuildEventContext is especially useful in multiprocessor environments.

.NET Framework

Supported in: 4, 3.5

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft