Activity.SetIdFormat(ActivityIdFormat) 方法

定义

在开始前,设置此 Activity 的 ID 格式。Sets the ID format on this Activity before it is started.

public:
 System::Diagnostics::Activity ^ SetIdFormat(System::Diagnostics::ActivityIdFormat format);
public System.Diagnostics.Activity SetIdFormat (System.Diagnostics.ActivityIdFormat format);
member this.SetIdFormat : System.Diagnostics.ActivityIdFormat -> System.Diagnostics.Activity
Public Function SetIdFormat (format As ActivityIdFormat) As Activity

参数

format
ActivityIdFormat

枚举值之一,它指定 Id 属性的格式。One of the enumeration values that specifies the format of the Id property.

返回

Activity

便于链接的 thisthis for convenient chaining.

注解

指定的格式将优先于 Parent.IdFormat ,格式为 ParentIdDefaultIdFormatForceDefaultIdFormatThe specified format will take precedence over Parent.IdFormat, the ParentId format, DefaultIdFormat, and ForceDefaultIdFormat.

适用于