ProfilerOptions Class
Definition
- Namespace
- Cuemon.Diagnostics
- Assemblies
- Cuemon.Diagnostics.dll
Specifies options that is related to Profiler operations.
public class ProfilerOptions : IParameterObject
- Inheritance
-
ProfilerOptions
- Implements
- Derived
Examples
The following example demonstrates how to configure
using System;
using System.Reflection;
using Cuemon.Diagnostics;
using Cuemon.Reflection;
namespace MyApp.Examples;
public static class ProfilerOptionsExample
{
private sealed class SampleProfilerOptions : ProfilerOptions
{
}
public static void Demonstrate()
{
ProfilerOptions options = new SampleProfilerOptions
{
MethodDescriptor = () => MethodDescriptor.Create(MethodBase.GetCurrentMethod()!).AppendRuntimeArguments(500),
RuntimeParameters = new object[] { 500 }
};
Console.WriteLine(options.MethodDescriptor().MethodName);
Console.WriteLine(options.MethodDescriptor().RuntimeArguments.Count);
Console.WriteLine(options.RuntimeParameters.Length);
}
}
Constructors
| Name | Description |
|---|---|
| ProfilerOptions() | Initializes a new instance of the ProfilerOptions class. |
Properties
| Name | Description |
|---|---|
| MethodDescriptor | Gets or sets the callback function delegate that resolves a MethodDescriptor. |
| RuntimeParameters | Gets or sets an Object array that represents runtime values. |