Delen via


TraceKeywords Class

Common trace keywords that may be used across teams. Feel free to add keywords that will be useful to all teams. Team-specific feature keywords should be kept in the team's own code area.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.TraceKeywords

Namespace:  Microsoft.TeamFoundation
Assembly:  Microsoft.TeamFoundation.Common (in Microsoft.TeamFoundation.Common.dll)

Syntax

'Declaration
Public Class TraceKeywords
public class TraceKeywords
public ref class TraceKeywords
type TraceKeywords =  class end
public class TraceKeywords

The TraceKeywords type exposes the following members.

Constructors

  Name Description
Public method TraceKeywords

Top

Methods

  Name Description
Public methodStatic member BuildKeyword Build a formatted keyword from the keyword fragments. Having all callers build their keywords with this method promotes consistency and ease of tweaking the keyword format.To avoid collisions with other products, this convention may be changed to a new format.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member API
Public fieldStatic member Authentication
Public fieldStatic member Authorization
Public fieldStatic member BlobStorage
Public fieldStatic member Database
Public fieldStatic member Discussion
Public fieldStatic member Framework
Public fieldStatic member General
Public fieldStatic member KeywordDelimiter
Public fieldStatic member KeywordPrefix
Public fieldStatic member LabManagement
Public fieldStatic member Security
Public fieldStatic member SharePoint
Public fieldStatic member TeamBuild
Public fieldStatic member TeamExplorer
Public fieldStatic member TeamNavigator
Public fieldStatic member TestManagement
Public fieldStatic member TSWebAccess
Public fieldStatic member VersionControl
Public fieldStatic member Warehouse
Public fieldStatic member WorkItemTracking

Top

Remarks

Trace keywords provide a mechanism to compartmentalize the trace messages to functional areas. The keywords are provided as a string array, and can be any string with which the caller wants to tag the trace output.

Each keyword corresponds to a TraceSwitch object, which can be set via the application config file (exe.config, web.config) or at runtime. As an optimization, the TraceSettings class keeps track if any trace switches are enabled and exposes a Boolean (IsTracingEnabled) that can be quickly checked to see whether trace output should be tried.

Each TraceSwitch has a TraceLevel that is one of these values:

  • Off: No output.

  • Error: Errors that occur in your code. For example, you have an exception filter and want to trace the exception.

  • Note: you should be sending information about these to the event log as errors.

  • Warning: Conditions noticed by your application that are problematic but may be transient or self-correcting that should probably be sent to the event log as warnings also.

  • Info: Informative messages, concise and brief.

  • Verbose: Other information; no limits on how much information is provided here.

Thread Safety

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

See Also

Reference

Microsoft.TeamFoundation Namespace