Bewerken

Share via


SampleActivity<T> Delegate

Definition

A delegate that defines the signature of the ActivityListener callbacks used in the sampling process.

generic <typename T>
public delegate System::Diagnostics::ActivitySamplingResult SampleActivity(ActivityCreationOptions<T> % options);
public delegate System.Diagnostics.ActivitySamplingResult SampleActivity<T>(ref ActivityCreationOptions<T> options);
type SampleActivity<'T> = delegate of ActivityCreationOptions -> ActivitySamplingResult
Public Delegate Function SampleActivity(Of T)(ByRef options As ActivityCreationOptions(Of T)) As ActivitySamplingResult 

Type Parameters

T

The type of the requested parent to create the Activity object with. Should be either a string or an ActivityContext instance.

Parameters

options
ActivityCreationOptions<T>

The Activity creation options used by ActivityListener callbacks to decide creating the Activity object or not.

Return Value

An object containing the sampling results, which indicate the amount of data to collect for the related Activity.

Extension Methods

GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to