namespace System.Diagnostics {
public class Activity : IDisposable {
+ public bool HasRemoteParent { get; }
+ public bool IsStopped { get; }
+ public static event EventHandler<ActivityChangedEventArgs>? CurrentChanged;
+ public Activity.Enumerator<ActivityEvent> EnumerateEvents();
+ public Activity.Enumerator<ActivityLink> EnumerateLinks();
+ public Activity.Enumerator<KeyValuePair<string, object?>> EnumerateTagObjects();
+ public struct Enumerator<T> {
+ public ref T Current { get; }
+ public Activity.Enumerator<T> GetEnumerator();
+ public bool MoveNext();
+ }
}
+ public readonly struct ActivityChangedEventArgs {
+ public Activity Current { get; set; }
+ public Activity Previous { get; set; }
+ }
public readonly struct ActivityContext : IEquatable<ActivityContext> {
+ public static bool TryParse(string traceParent, string traceState, bool isRemote, out ActivityContext context);
}
public readonly struct ActivityCreationOptions<T> {
+ public string? TraceState { get; set; }
}
public readonly struct ActivityEvent {
+ public Activity.Enumerator<KeyValuePair<string, object?>> EnumerateTagObjects();
}
public readonly struct ActivityLink : IEquatable<ActivityLink> {
+ public Activity.Enumerator<KeyValuePair<string, object?>> EnumerateTagObjects();
}
public sealed class ActivitySource : IDisposable {
- public string? Version { get; }
+ public string Version { get; }
- public Activity? CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown);
+ public Activity CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink> links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown);
- public Activity? CreateActivity(string name, ActivityKind kind, string parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown);
+ public Activity CreateActivity(string name, ActivityKind kind, string parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink> links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown);
- public Activity? StartActivity(ActivityKind kind, ActivityContext parentContext = default(ActivityContext), IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default(DateTimeOffset), string name = "");
+ public Activity StartActivity(ActivityKind kind, ActivityContext parentContext = default(ActivityContext), IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink> links = null, DateTimeOffset startTime = default(DateTimeOffset), string name = "");
- public Activity? StartActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default(DateTimeOffset));
+ public Activity StartActivity(string name, ActivityKind kind, ActivityContext parentContext, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink> links = null, DateTimeOffset startTime = default(DateTimeOffset));
- public Activity? StartActivity(string name, ActivityKind kind, string parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink>? links = null, DateTimeOffset startTime = default(DateTimeOffset));
+ public Activity StartActivity(string name, ActivityKind kind, string parentId, IEnumerable<KeyValuePair<string, object?>>? tags = null, IEnumerable<ActivityLink> links = null, DateTimeOffset startTime = default(DateTimeOffset));
}
public static class Debug {
public static void Assert(bool condition, string? message, string detailMessageFormat, params object?[] args);
public static void Print(string format, params object?[] args);
public static void WriteLine(string format, params object?[] args);
}
public class DelimitedListTraceListener : TextWriterTraceListener {
public override void TraceEvent(TraceEventCache? eventCache, string source, TraceEventType eventType, int id, string? format, params object?[]? args);
}
public class DiagnosticListener : DiagnosticSource, IDisposable, IObservable<KeyValuePair<string, object?>> {
public override void Write(string name, object? value);
}
public abstract class DiagnosticSource {
public Activity StartActivity(Activity activity, object? args);
public void StopActivity(Activity activity, object? args);
public abstract void Write(string name, object? value);
}
public class EventTypeFilter : TraceFilter {
public override bool ShouldTrace(TraceEventCache? cache, string source, TraceEventType eventType, int id, string? formatOrMessage, object?[]? args, object? data1, object?[]? data);
}
+ public sealed class InitializingSwitchEventArgs : EventArgs {
+ public InitializingSwitchEventArgs(Switch @switch);
+ public Switch Switch { get; }
+ }
+ public sealed class InitializingTraceSourceEventArgs : EventArgs {
+ public InitializingTraceSourceEventArgs(TraceSource traceSource);
+ public TraceSource TraceSource { get; }
+ public bool WasInitialized { get; set; }
+ }
public class Process : Component, IDisposable {
public TimeSpan PrivilegedProcessorTime { get; }
public DateTime StartTime { get; }
+ public bool WaitForExit(TimeSpan timeout);
+ public bool WaitForInputIdle(TimeSpan timeout);
}
public class SourceFilter : TraceFilter {
public override bool ShouldTrace(TraceEventCache? cache, string source, TraceEventType eventType, int id, string? formatOrMessage, object?[]? args, object? data1, object?[]? data);
}
public class StackFrame {
public virtual MethodBase GetMethod();
}
public class Stopwatch {
+ public static TimeSpan GetElapsedTime(long startingTimestamp);
+ public static TimeSpan GetElapsedTime(long startingTimestamp, long endingTimestamp);
}
public abstract class Switch {
+ public string DefaultValue { get; }
- protected string Value { get; set; }
+ public string Value { get; set; }
+ public static event EventHandler<InitializingSwitchEventArgs>? Initializing;
+ public void Refresh();
}
public sealed class Trace {
+ public static event EventHandler Refreshing;
public static void TraceError(string format, params object?[]? args);
public static void TraceInformation(string format, params object?[]? args);
public static void TraceWarning(string format, params object?[]? args);
}
public abstract class TraceFilter {
public abstract bool ShouldTrace(TraceEventCache? cache, string source, TraceEventType eventType, int id, string? formatOrMessage, object?[]? args, object? data1, object?[]? data);
}
public abstract class TraceListener : MarshalByRefObject, IDisposable {
public virtual void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string format, params object[] args);
}
public class TraceSource {
+ public SourceLevels DefaultLevel { get; }
+ public static event EventHandler<InitializingTraceSourceEventArgs>? Initializing;
public void TraceEvent(TraceEventType eventType, int id, string? format, params object?[]? args);
public void TraceInformation(string? format, params object?[]? args);
}
+ public sealed class UnreachableException : Exception {
+ public UnreachableException();
+ public UnreachableException(string message);
+ public UnreachableException(string message, Exception innerException);
+ }
public class XmlWriterTraceListener : TextWriterTraceListener {
public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string format, params object[] args);
}
}