PolicyContext.WriteToTrace Method (String, Object )

Writes policy trace information when policy tracing is enabled, using the specified formatted string and array of arguments to be formatted.

Namespace: Microsoft.Web.Services2.Policy
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim format As String
Dim args() As Object
Dim policyContext1 As PolicyContext
policyContext1.WriteToTrace(format, args)

Syntax

'Declaration
Overloads Public Sub WriteToTrace( _
    ByVal format As String, _
    ByVal ParamArray args() As Object _
)
public void WriteToTrace(
    string format, 
    params object[] args
);
public: Void WriteToTrace(
    String^ format, 
    array<Object^>^ args
);
public void WriteToTrace(
    System.String format, 
    System.Object[] args
);
public function WriteToTrace(
     format : String, 
     args : Object[]
);

Parameters

  • format
    A formatted string containing the trace message.
  • args
    An array of objects containing the values that correspond to the format specifiers in the message string.

Remarks

Policy tracing is enabled when the enabled attribute of the <policyTrace> element in the configuration file is set to true . For more information on using a formatted string, see the System.String.Format(System.String,System.Object) documentation in the .NET Framework.

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.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

PolicyContext Class
Microsoft.Web.Services2.Policy Namespace

Other Resources

PolicyContext Members