diff --git a/eng/Build.props b/eng/Build.props index 27931e55e0..e07f2a19fc 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -22,6 +22,7 @@ Format: --> + diff --git a/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/System.Diagnostics.DiagnosticSource.8.0.0.csproj b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/System.Diagnostics.DiagnosticSource.8.0.0.csproj new file mode 100644 index 0000000000..5f6502f287 --- /dev/null +++ b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/System.Diagnostics.DiagnosticSource.8.0.0.csproj @@ -0,0 +1,18 @@ + + + + net6.0;net7.0;net8.0;netstandard2.0 + System.Diagnostics.DiagnosticSource + Open + + + + + + + + + + + + diff --git a/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net6.0/System.Diagnostics.DiagnosticSource.cs b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net6.0/System.Diagnostics.DiagnosticSource.cs new file mode 100644 index 0000000000..3492c7a2ab --- /dev/null +++ b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net6.0/System.Diagnostics.DiagnosticSource.cs @@ -0,0 +1,884 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ +[assembly: System.Runtime.CompilerServices.CompilationRelaxations(8)] +[assembly: System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows = true)] +[assembly: System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] +[assembly: System.Reflection.AssemblyMetadata("Serviceable", "True")] +[assembly: System.Reflection.AssemblyMetadata("PreferInbox", "True")] +[assembly: System.Reflection.AssemblyDefaultAlias("System.Diagnostics.DiagnosticSource")] +[assembly: System.Resources.NeutralResourcesLanguage("en-US")] +[assembly: System.CLSCompliant(true)] +[assembly: System.Reflection.AssemblyMetadata("IsTrimmable", "True")] +[assembly: System.Runtime.InteropServices.DefaultDllImportSearchPaths(System.Runtime.InteropServices.DllImportSearchPath.AssemblyDirectory | System.Runtime.InteropServices.DllImportSearchPath.System32)] +[assembly: System.Reflection.AssemblyCompany("Microsoft Corporation")] +[assembly: System.Reflection.AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] +[assembly: System.Reflection.AssemblyDescription("Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools)\r\n\r\nCommonly Used Types:\r\nSystem.Diagnostics.DiagnosticListener\r\nSystem.Diagnostics.DiagnosticSource")] +[assembly: System.Reflection.AssemblyFileVersion("8.0.23.53103")] +[assembly: System.Reflection.AssemblyInformationalVersion("8.0.0+5535e31a712343a63f5d7d796cd874e563e5ac14")] +[assembly: System.Reflection.AssemblyProduct("Microsoft® .NET")] +[assembly: System.Reflection.AssemblyTitle("System.Diagnostics.DiagnosticSource")] +[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/dotnet/runtime")] +[assembly: System.Reflection.AssemblyVersionAttribute("8.0.0.0")] +[assembly: System.Runtime.CompilerServices.ReferenceAssembly] +[assembly: System.Reflection.AssemblyFlagsAttribute((System.Reflection.AssemblyNameFlags)0x70)] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.IsExternalInit))] +namespace System.Diagnostics +{ + public partial class Activity : IDisposable + { + public Activity(string operationName) { } + + public ActivityTraceFlags ActivityTraceFlags { get { throw null; } set { } } + + public Collections.Generic.IEnumerable> Baggage { get { throw null; } } + + public ActivityContext Context { get { throw null; } } + + public static Activity? Current { get { throw null; } set { } } + + public static ActivityIdFormat DefaultIdFormat { get { throw null; } set { } } + + public string DisplayName { get { throw null; } set { } } + + public TimeSpan Duration { get { throw null; } } + + public Collections.Generic.IEnumerable Events { get { throw null; } } + + public static bool ForceDefaultIdFormat { get { throw null; } set { } } + + public bool HasRemoteParent { get { throw null; } } + + public string? Id { get { throw null; } } + + public ActivityIdFormat IdFormat { get { throw null; } } + + public bool IsAllDataRequested { get { throw null; } set { } } + + public bool IsStopped { get { throw null; } } + + public ActivityKind Kind { get { throw null; } } + + public Collections.Generic.IEnumerable Links { get { throw null; } } + + public string OperationName { get { throw null; } } + + public Activity? Parent { get { throw null; } } + + public string? ParentId { get { throw null; } } + + public ActivitySpanId ParentSpanId { get { throw null; } } + + public bool Recorded { get { throw null; } } + + public string? RootId { get { throw null; } } + + public ActivitySource Source { get { throw null; } } + + public ActivitySpanId SpanId { get { throw null; } } + + public DateTime StartTimeUtc { get { throw null; } } + + public ActivityStatusCode Status { get { throw null; } } + + public string? StatusDescription { get { throw null; } } + + public Collections.Generic.IEnumerable> TagObjects { get { throw null; } } + + public Collections.Generic.IEnumerable> Tags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public static Func? TraceIdGenerator { get { throw null; } set { } } + + public string? TraceStateString { get { throw null; } set { } } + + public static event EventHandler? CurrentChanged { add { } remove { } } + + public Activity AddBaggage(string key, string? value) { throw null; } + + public Activity AddEvent(ActivityEvent e) { throw null; } + + public Activity AddTag(string key, object? value) { throw null; } + + public Activity AddTag(string key, string? value) { throw null; } + + public void Dispose() { } + + protected virtual void Dispose(bool disposing) { } + + public Enumerator EnumerateEvents() { throw null; } + + public Enumerator EnumerateLinks() { throw null; } + + public Enumerator> EnumerateTagObjects() { throw null; } + + public string? GetBaggageItem(string key) { throw null; } + + public object? GetCustomProperty(string propertyName) { throw null; } + + public object? GetTagItem(string key) { throw null; } + + public Activity SetBaggage(string key, string? value) { throw null; } + + public void SetCustomProperty(string propertyName, object? propertyValue) { } + + public Activity SetEndTime(DateTime endTimeUtc) { throw null; } + + public Activity SetIdFormat(ActivityIdFormat format) { throw null; } + + public Activity SetParentId(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags activityTraceFlags = ActivityTraceFlags.None) { throw null; } + + public Activity SetParentId(string parentId) { throw null; } + + public Activity SetStartTime(DateTime startTimeUtc) { throw null; } + + public Activity SetStatus(ActivityStatusCode code, string? description = null) { throw null; } + + public Activity SetTag(string key, object? value) { throw null; } + + public Activity Start() { throw null; } + + public void Stop() { } + + public partial struct Enumerator + { + private object _dummy; + private int _dummyPrimitive; + public ref T Current { get { throw null; } } + + public readonly Enumerator GetEnumerator() { throw null; } + + public bool MoveNext() { throw null; } + } + } + + public readonly partial struct ActivityChangedEventArgs + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Activity? Current { get { throw null; } init { } } + + public Activity? Previous { get { throw null; } init { } } + } + + public readonly partial struct ActivityContext : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityContext(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags traceFlags, string? traceState = null, bool isRemote = false) { } + + public bool IsRemote { get { throw null; } } + + public ActivitySpanId SpanId { get { throw null; } } + + public ActivityTraceFlags TraceFlags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public string? TraceState { get { throw null; } } + + public readonly bool Equals(ActivityContext value) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityContext left, ActivityContext right) { throw null; } + + public static bool operator !=(ActivityContext left, ActivityContext right) { throw null; } + + public static ActivityContext Parse(string traceParent, string? traceState) { throw null; } + + public static bool TryParse(string? traceParent, string? traceState, bool isRemote, out ActivityContext context) { throw null; } + + public static bool TryParse(string? traceParent, string? traceState, out ActivityContext context) { throw null; } + } + + public readonly partial struct ActivityCreationOptions + { + private readonly T _Parent_k__BackingField; + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityKind Kind { get { throw null; } } + + public Collections.Generic.IEnumerable? Links { get { throw null; } } + + public string Name { get { throw null; } } + + public T Parent { get { throw null; } } + + public ActivityTagsCollection SamplingTags { get { throw null; } } + + public ActivitySource Source { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public string? TraceState { get { throw null; } init { } } + } + + public readonly partial struct ActivityEvent + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityEvent(string name, DateTimeOffset timestamp = default, ActivityTagsCollection? tags = null) { } + + public ActivityEvent(string name) { } + + public string Name { get { throw null; } } + + public Collections.Generic.IEnumerable> Tags { get { throw null; } } + + public DateTimeOffset Timestamp { get { throw null; } } + + public readonly Activity.Enumerator> EnumerateTagObjects() { throw null; } + } + + public enum ActivityIdFormat + { + Unknown = 0, + Hierarchical = 1, + W3C = 2 + } + + public enum ActivityKind + { + Internal = 0, + Server = 1, + Client = 2, + Producer = 3, + Consumer = 4 + } + + public readonly partial struct ActivityLink : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityLink(ActivityContext context, ActivityTagsCollection? tags = null) { } + + public ActivityContext Context { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public readonly Activity.Enumerator> EnumerateTagObjects() { throw null; } + + public readonly bool Equals(ActivityLink value) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityLink left, ActivityLink right) { throw null; } + + public static bool operator !=(ActivityLink left, ActivityLink right) { throw null; } + } + + public sealed partial class ActivityListener : IDisposable + { + public Action? ActivityStarted { get { throw null; } set { } } + + public Action? ActivityStopped { get { throw null; } set { } } + + public SampleActivity? Sample { get { throw null; } set { } } + + public SampleActivity? SampleUsingParentId { get { throw null; } set { } } + + public Func? ShouldListenTo { get { throw null; } set { } } + + public void Dispose() { } + } + + public enum ActivitySamplingResult + { + None = 0, + PropagationData = 1, + AllData = 2, + AllDataAndRecorded = 3 + } + + public sealed partial class ActivitySource : IDisposable + { + public ActivitySource(string name, string? version = "") { } + + public string Name { get { throw null; } } + + public string? Version { get { throw null; } } + + public static void AddActivityListener(ActivityListener listener) { } + + public Activity? CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) { throw null; } + + public Activity? CreateActivity(string name, ActivityKind kind, string? parentId, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) { throw null; } + + public Activity? CreateActivity(string name, ActivityKind kind) { throw null; } + + public void Dispose() { } + + public bool HasListeners() { throw null; } + + public Activity? StartActivity(ActivityKind kind, ActivityContext parentContext = default, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default, string name = "") { throw null; } + + public Activity? StartActivity(string name, ActivityKind kind, ActivityContext parentContext, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default) { throw null; } + + public Activity? StartActivity(string name, ActivityKind kind, string? parentId, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default) { throw null; } + + public Activity? StartActivity(string name = "", ActivityKind kind = ActivityKind.Internal) { throw null; } + } + + public readonly partial struct ActivitySpanId : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public readonly void CopyTo(Span destination) { } + + public static ActivitySpanId CreateFromBytes(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateFromString(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateFromUtf8String(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateRandom() { throw null; } + + public readonly bool Equals(ActivitySpanId spanId) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivitySpanId spanId1, ActivitySpanId spandId2) { throw null; } + + public static bool operator !=(ActivitySpanId spanId1, ActivitySpanId spandId2) { throw null; } + + public readonly string ToHexString() { throw null; } + + public override readonly string ToString() { throw null; } + } + + public enum ActivityStatusCode + { + Unset = 0, + Ok = 1, + Error = 2 + } + + public partial class ActivityTagsCollection : Collections.Generic.IDictionary, Collections.Generic.ICollection>, Collections.Generic.IEnumerable>, Collections.IEnumerable + { + public ActivityTagsCollection() { } + + public ActivityTagsCollection(Collections.Generic.IEnumerable> list) { } + + public int Count { get { throw null; } } + + public bool IsReadOnly { get { throw null; } } + + public object? this[string key] { get { throw null; } set { } } + + public Collections.Generic.ICollection Keys { get { throw null; } } + + public Collections.Generic.ICollection Values { get { throw null; } } + + public void Add(Collections.Generic.KeyValuePair item) { } + + public void Add(string key, object? value) { } + + public void Clear() { } + + public bool Contains(Collections.Generic.KeyValuePair item) { throw null; } + + public bool ContainsKey(string key) { throw null; } + + public void CopyTo(Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + + public Enumerator GetEnumerator() { throw null; } + + public bool Remove(Collections.Generic.KeyValuePair item) { throw null; } + + public bool Remove(string key) { throw null; } + + Collections.Generic.IEnumerator> Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + + Collections.IEnumerator Collections.IEnumerable.GetEnumerator() { throw null; } + + public bool TryGetValue(string key, out object? value) { throw null; } + + public partial struct Enumerator : Collections.Generic.IEnumerator>, Collections.IEnumerator, IDisposable + { + public Collections.Generic.KeyValuePair Current { get { throw null; } } + + object Collections.IEnumerator.Current { get { throw null; } } + + public void Dispose() { } + + public bool MoveNext() { throw null; } + + void Collections.IEnumerator.Reset() { } + } + } + + [Flags] + public enum ActivityTraceFlags + { + None = 0, + Recorded = 1 + } + + public readonly partial struct ActivityTraceId : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public readonly void CopyTo(Span destination) { } + + public static ActivityTraceId CreateFromBytes(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateFromString(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateFromUtf8String(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateRandom() { throw null; } + + public readonly bool Equals(ActivityTraceId traceId) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityTraceId traceId1, ActivityTraceId traceId2) { throw null; } + + public static bool operator !=(ActivityTraceId traceId1, ActivityTraceId traceId2) { throw null; } + + public readonly string ToHexString() { throw null; } + + public override readonly string ToString() { throw null; } + } + + public partial class DiagnosticListener : DiagnosticSource, IObservable>, IDisposable + { + public DiagnosticListener(string name) { } + + public static IObservable AllListeners { get { throw null; } } + + public string Name { get { throw null; } } + + public virtual void Dispose() { } + + public bool IsEnabled() { throw null; } + + public override bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; } + + public override bool IsEnabled(string name) { throw null; } + + public override void OnActivityExport(Activity activity, object? payload) { } + + public override void OnActivityImport(Activity activity, object? payload) { } + + public virtual IDisposable Subscribe(IObserver> observer, Func? isEnabled, Action? onActivityImport = null, Action? onActivityExport = null) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer, Func? isEnabled) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer, Predicate? isEnabled) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer) { throw null; } + + public override string ToString() { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public override void Write(string name, object? value) { } + } + + public abstract partial class DiagnosticSource + { + public virtual bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; } + + public abstract bool IsEnabled(string name); + public virtual void OnActivityExport(Activity activity, object? payload) { } + + public virtual void OnActivityImport(Activity activity, object? payload) { } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public Activity StartActivity(Activity activity, object? args) { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public Activity StartActivity(Activity activity, T args) { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public void StopActivity(Activity activity, object? args) { } + + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public void StopActivity(Activity activity, T args) { } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public abstract void Write(string name, object? value); + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public void Write(string name, T value) { } + } + + public abstract partial class DistributedContextPropagator + { + public static DistributedContextPropagator Current { get { throw null; } set { } } + + public abstract Collections.Generic.IReadOnlyCollection Fields { get; } + + public static DistributedContextPropagator CreateDefaultPropagator() { throw null; } + + public static DistributedContextPropagator CreateNoOutputPropagator() { throw null; } + + public static DistributedContextPropagator CreatePassThroughPropagator() { throw null; } + + public abstract Collections.Generic.IEnumerable>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter); + public abstract void ExtractTraceIdAndState(object? carrier, PropagatorGetterCallback? getter, out string? traceId, out string? traceState); + public abstract void Inject(Activity? activity, object? carrier, PropagatorSetterCallback? setter); + public delegate void PropagatorGetterCallback(object? carrier, string fieldName, out string? fieldValue, out Collections.Generic.IEnumerable? fieldValues); + public delegate void PropagatorSetterCallback(object? carrier, string fieldName, string fieldValue); + } + + public delegate ActivitySamplingResult SampleActivity(ref ActivityCreationOptions options); + public partial struct TagList : Collections.Generic.IList>, Collections.Generic.ICollection>, Collections.Generic.IEnumerable>, Collections.IEnumerable, Collections.Generic.IReadOnlyList>, Collections.Generic.IReadOnlyCollection> + { + private object _dummy; + private int _dummyPrimitive; + public TagList(ReadOnlySpan> tagList) { } + + public int Count { get { throw null; } } + + public bool IsReadOnly { get { throw null; } } + + public Collections.Generic.KeyValuePair this[int index] { get { throw null; } set { } } + + public void Add(Collections.Generic.KeyValuePair tag) { } + + public void Add(string key, object? value) { } + + public void Clear() { } + + public readonly bool Contains(Collections.Generic.KeyValuePair item) { throw null; } + + public readonly void CopyTo(Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + + public readonly void CopyTo(Span> tags) { } + + public readonly Collections.Generic.IEnumerator> GetEnumerator() { throw null; } + + public readonly int IndexOf(Collections.Generic.KeyValuePair item) { throw null; } + + public void Insert(int index, Collections.Generic.KeyValuePair item) { } + + public bool Remove(Collections.Generic.KeyValuePair item) { throw null; } + + public void RemoveAt(int index) { } + + readonly Collections.IEnumerator Collections.IEnumerable.GetEnumerator() { throw null; } + + public partial struct Enumerator : Collections.Generic.IEnumerator>, Collections.IEnumerator, IDisposable + { + private int _dummyPrimitive; + public Collections.Generic.KeyValuePair Current { get { throw null; } } + + object Collections.IEnumerator.Current { get { throw null; } } + + public void Dispose() { } + + public bool MoveNext() { throw null; } + + public void Reset() { } + } + } +} + +namespace System.Diagnostics.Metrics +{ + public sealed partial class Counter : Instrument where T : struct + { + internal Counter() : base(default!, default!, default, default) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag) { } + + public void Add(T delta, params Collections.Generic.KeyValuePair[] tags) { } + + public void Add(T delta, in TagList tagList) { } + + public void Add(T delta, ReadOnlySpan> tags) { } + + public void Add(T delta) { } + } + + public sealed partial class Histogram : Instrument where T : struct + { + internal Histogram() : base(default!, default!, default, default) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag) { } + + public void Record(T value, params Collections.Generic.KeyValuePair[] tags) { } + + public void Record(T value, in TagList tagList) { } + + public void Record(T value, ReadOnlySpan> tags) { } + + public void Record(T value) { } + } + + public partial interface IMeterFactory : IDisposable + { + Meter Create(MeterOptions options); + } + + public abstract partial class Instrument + { + protected Instrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) { } + + protected Instrument(Meter meter, string name, string? unit, string? description) { } + + public string? Description { get { throw null; } } + + public bool Enabled { get { throw null; } } + + public virtual bool IsObservable { get { throw null; } } + + public Meter Meter { get { throw null; } } + + public string Name { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public string? Unit { get { throw null; } } + + protected void Publish() { } + } + + public abstract partial class Instrument : Instrument where T : struct + { + protected Instrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) : base(default!, default!, default, default) { } + + protected Instrument(Meter meter, string name, string? unit, string? description) : base(default!, default!, default, default) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag) { } + + protected void RecordMeasurement(T measurement, in TagList tagList) { } + + protected void RecordMeasurement(T measurement, ReadOnlySpan> tags) { } + + protected void RecordMeasurement(T measurement) { } + } + + public delegate void MeasurementCallback(Instrument instrument, T measurement, ReadOnlySpan> tags, object? state) + where T : struct; + public readonly partial struct Measurement + where T : struct + { + private readonly T _Value_k__BackingField; + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Measurement(T value, Collections.Generic.IEnumerable>? tags) { } + + public Measurement(T value, params Collections.Generic.KeyValuePair[]? tags) { } + + public Measurement(T value, ReadOnlySpan> tags) { } + + public Measurement(T value) { } + + public ReadOnlySpan> Tags { get { throw null; } } + + public T Value { get { throw null; } } + } + + public partial class Meter : IDisposable + { + public Meter(MeterOptions options) { } + + public Meter(string name, string? version, Collections.Generic.IEnumerable>? tags, object? scope = null) { } + + public Meter(string name, string? version) { } + + public Meter(string name) { } + + public string Name { get { throw null; } } + + public object? Scope { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public string? Version { get { throw null; } } + + public Counter CreateCounter(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public Counter CreateCounter(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public Histogram CreateHistogram(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public Histogram CreateHistogram(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public UpDownCounter CreateUpDownCounter(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public UpDownCounter CreateUpDownCounter(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public void Dispose() { } + + protected virtual void Dispose(bool disposing) { } + } + + public static partial class MeterFactoryExtensions + { + public static Meter Create(this IMeterFactory meterFactory, string name, string? version = null, Collections.Generic.IEnumerable>? tags = null) { throw null; } + } + + public sealed partial class MeterListener : IDisposable + { + public Action? InstrumentPublished { get { throw null; } set { } } + + public Action? MeasurementsCompleted { get { throw null; } set { } } + + public object? DisableMeasurementEvents(Instrument instrument) { throw null; } + + public void Dispose() { } + + public void EnableMeasurementEvents(Instrument instrument, object? state = null) { } + + public void RecordObservableInstruments() { } + + public void SetMeasurementEventCallback(MeasurementCallback? measurementCallback) + where T : struct { } + + public void Start() { } + } + + public partial class MeterOptions + { + public MeterOptions(string name) { } + + public string Name { get { throw null; } set { } } + + public object? Scope { get { throw null; } set { } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } set { } } + + public string? Version { get { throw null; } set { } } + } + + public sealed partial class ObservableCounter : ObservableInstrument where T : struct + { + internal ObservableCounter() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public sealed partial class ObservableGauge : ObservableInstrument where T : struct + { + internal ObservableGauge() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public abstract partial class ObservableInstrument : Instrument where T : struct + { + protected ObservableInstrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) : base(default!, default!, default, default) { } + + protected ObservableInstrument(Meter meter, string name, string? unit, string? description) : base(default!, default!, default, default) { } + + public override bool IsObservable { get { throw null; } } + + protected abstract Collections.Generic.IEnumerable> Observe(); + } + + public sealed partial class ObservableUpDownCounter : ObservableInstrument where T : struct + { + internal ObservableUpDownCounter() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public sealed partial class UpDownCounter : Instrument where T : struct + { + internal UpDownCounter() : base(default!, default!, default, default) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag) { } + + public void Add(T delta, params Collections.Generic.KeyValuePair[] tags) { } + + public void Add(T delta, in TagList tagList) { } + + public void Add(T delta, ReadOnlySpan> tags) { } + + public void Add(T delta) { } + } +} \ No newline at end of file diff --git a/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net7.0/System.Diagnostics.DiagnosticSource.cs b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net7.0/System.Diagnostics.DiagnosticSource.cs new file mode 100644 index 0000000000..d061b5cf78 --- /dev/null +++ b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net7.0/System.Diagnostics.DiagnosticSource.cs @@ -0,0 +1,884 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ +[assembly: System.Runtime.CompilerServices.CompilationRelaxations(8)] +[assembly: System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows = true)] +[assembly: System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")] +[assembly: System.Reflection.AssemblyMetadata("Serviceable", "True")] +[assembly: System.Reflection.AssemblyMetadata("PreferInbox", "True")] +[assembly: System.Reflection.AssemblyDefaultAlias("System.Diagnostics.DiagnosticSource")] +[assembly: System.Resources.NeutralResourcesLanguage("en-US")] +[assembly: System.CLSCompliant(true)] +[assembly: System.Reflection.AssemblyMetadata("IsTrimmable", "True")] +[assembly: System.Runtime.InteropServices.DefaultDllImportSearchPaths(System.Runtime.InteropServices.DllImportSearchPath.AssemblyDirectory | System.Runtime.InteropServices.DllImportSearchPath.System32)] +[assembly: System.Reflection.AssemblyCompany("Microsoft Corporation")] +[assembly: System.Reflection.AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] +[assembly: System.Reflection.AssemblyDescription("Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools)\r\n\r\nCommonly Used Types:\r\nSystem.Diagnostics.DiagnosticListener\r\nSystem.Diagnostics.DiagnosticSource")] +[assembly: System.Reflection.AssemblyFileVersion("8.0.23.53103")] +[assembly: System.Reflection.AssemblyInformationalVersion("8.0.0+5535e31a712343a63f5d7d796cd874e563e5ac14")] +[assembly: System.Reflection.AssemblyProduct("Microsoft® .NET")] +[assembly: System.Reflection.AssemblyTitle("System.Diagnostics.DiagnosticSource")] +[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/dotnet/runtime")] +[assembly: System.Reflection.AssemblyVersionAttribute("8.0.0.0")] +[assembly: System.Runtime.CompilerServices.ReferenceAssembly] +[assembly: System.Reflection.AssemblyFlagsAttribute((System.Reflection.AssemblyNameFlags)0x70)] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.IsExternalInit))] +namespace System.Diagnostics +{ + public partial class Activity : IDisposable + { + public Activity(string operationName) { } + + public ActivityTraceFlags ActivityTraceFlags { get { throw null; } set { } } + + public Collections.Generic.IEnumerable> Baggage { get { throw null; } } + + public ActivityContext Context { get { throw null; } } + + public static Activity? Current { get { throw null; } set { } } + + public static ActivityIdFormat DefaultIdFormat { get { throw null; } set { } } + + public string DisplayName { get { throw null; } set { } } + + public TimeSpan Duration { get { throw null; } } + + public Collections.Generic.IEnumerable Events { get { throw null; } } + + public static bool ForceDefaultIdFormat { get { throw null; } set { } } + + public bool HasRemoteParent { get { throw null; } } + + public string? Id { get { throw null; } } + + public ActivityIdFormat IdFormat { get { throw null; } } + + public bool IsAllDataRequested { get { throw null; } set { } } + + public bool IsStopped { get { throw null; } } + + public ActivityKind Kind { get { throw null; } } + + public Collections.Generic.IEnumerable Links { get { throw null; } } + + public string OperationName { get { throw null; } } + + public Activity? Parent { get { throw null; } } + + public string? ParentId { get { throw null; } } + + public ActivitySpanId ParentSpanId { get { throw null; } } + + public bool Recorded { get { throw null; } } + + public string? RootId { get { throw null; } } + + public ActivitySource Source { get { throw null; } } + + public ActivitySpanId SpanId { get { throw null; } } + + public DateTime StartTimeUtc { get { throw null; } } + + public ActivityStatusCode Status { get { throw null; } } + + public string? StatusDescription { get { throw null; } } + + public Collections.Generic.IEnumerable> TagObjects { get { throw null; } } + + public Collections.Generic.IEnumerable> Tags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public static Func? TraceIdGenerator { get { throw null; } set { } } + + public string? TraceStateString { get { throw null; } set { } } + + public static event EventHandler? CurrentChanged { add { } remove { } } + + public Activity AddBaggage(string key, string? value) { throw null; } + + public Activity AddEvent(ActivityEvent e) { throw null; } + + public Activity AddTag(string key, object? value) { throw null; } + + public Activity AddTag(string key, string? value) { throw null; } + + public void Dispose() { } + + protected virtual void Dispose(bool disposing) { } + + public Enumerator EnumerateEvents() { throw null; } + + public Enumerator EnumerateLinks() { throw null; } + + public Enumerator> EnumerateTagObjects() { throw null; } + + public string? GetBaggageItem(string key) { throw null; } + + public object? GetCustomProperty(string propertyName) { throw null; } + + public object? GetTagItem(string key) { throw null; } + + public Activity SetBaggage(string key, string? value) { throw null; } + + public void SetCustomProperty(string propertyName, object? propertyValue) { } + + public Activity SetEndTime(DateTime endTimeUtc) { throw null; } + + public Activity SetIdFormat(ActivityIdFormat format) { throw null; } + + public Activity SetParentId(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags activityTraceFlags = ActivityTraceFlags.None) { throw null; } + + public Activity SetParentId(string parentId) { throw null; } + + public Activity SetStartTime(DateTime startTimeUtc) { throw null; } + + public Activity SetStatus(ActivityStatusCode code, string? description = null) { throw null; } + + public Activity SetTag(string key, object? value) { throw null; } + + public Activity Start() { throw null; } + + public void Stop() { } + + public partial struct Enumerator + { + private object _dummy; + private int _dummyPrimitive; + public ref T Current { get { throw null; } } + + public readonly Enumerator GetEnumerator() { throw null; } + + public bool MoveNext() { throw null; } + } + } + + public readonly partial struct ActivityChangedEventArgs + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Activity? Current { get { throw null; } init { } } + + public Activity? Previous { get { throw null; } init { } } + } + + public readonly partial struct ActivityContext : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityContext(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags traceFlags, string? traceState = null, bool isRemote = false) { } + + public bool IsRemote { get { throw null; } } + + public ActivitySpanId SpanId { get { throw null; } } + + public ActivityTraceFlags TraceFlags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public string? TraceState { get { throw null; } } + + public readonly bool Equals(ActivityContext value) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityContext left, ActivityContext right) { throw null; } + + public static bool operator !=(ActivityContext left, ActivityContext right) { throw null; } + + public static ActivityContext Parse(string traceParent, string? traceState) { throw null; } + + public static bool TryParse(string? traceParent, string? traceState, bool isRemote, out ActivityContext context) { throw null; } + + public static bool TryParse(string? traceParent, string? traceState, out ActivityContext context) { throw null; } + } + + public readonly partial struct ActivityCreationOptions + { + private readonly T _Parent_k__BackingField; + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityKind Kind { get { throw null; } } + + public Collections.Generic.IEnumerable? Links { get { throw null; } } + + public string Name { get { throw null; } } + + public T Parent { get { throw null; } } + + public ActivityTagsCollection SamplingTags { get { throw null; } } + + public ActivitySource Source { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public string? TraceState { get { throw null; } init { } } + } + + public readonly partial struct ActivityEvent + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityEvent(string name, DateTimeOffset timestamp = default, ActivityTagsCollection? tags = null) { } + + public ActivityEvent(string name) { } + + public string Name { get { throw null; } } + + public Collections.Generic.IEnumerable> Tags { get { throw null; } } + + public DateTimeOffset Timestamp { get { throw null; } } + + public readonly Activity.Enumerator> EnumerateTagObjects() { throw null; } + } + + public enum ActivityIdFormat + { + Unknown = 0, + Hierarchical = 1, + W3C = 2 + } + + public enum ActivityKind + { + Internal = 0, + Server = 1, + Client = 2, + Producer = 3, + Consumer = 4 + } + + public readonly partial struct ActivityLink : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityLink(ActivityContext context, ActivityTagsCollection? tags = null) { } + + public ActivityContext Context { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public readonly Activity.Enumerator> EnumerateTagObjects() { throw null; } + + public readonly bool Equals(ActivityLink value) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityLink left, ActivityLink right) { throw null; } + + public static bool operator !=(ActivityLink left, ActivityLink right) { throw null; } + } + + public sealed partial class ActivityListener : IDisposable + { + public Action? ActivityStarted { get { throw null; } set { } } + + public Action? ActivityStopped { get { throw null; } set { } } + + public SampleActivity? Sample { get { throw null; } set { } } + + public SampleActivity? SampleUsingParentId { get { throw null; } set { } } + + public Func? ShouldListenTo { get { throw null; } set { } } + + public void Dispose() { } + } + + public enum ActivitySamplingResult + { + None = 0, + PropagationData = 1, + AllData = 2, + AllDataAndRecorded = 3 + } + + public sealed partial class ActivitySource : IDisposable + { + public ActivitySource(string name, string? version = "") { } + + public string Name { get { throw null; } } + + public string? Version { get { throw null; } } + + public static void AddActivityListener(ActivityListener listener) { } + + public Activity? CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) { throw null; } + + public Activity? CreateActivity(string name, ActivityKind kind, string? parentId, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) { throw null; } + + public Activity? CreateActivity(string name, ActivityKind kind) { throw null; } + + public void Dispose() { } + + public bool HasListeners() { throw null; } + + public Activity? StartActivity(ActivityKind kind, ActivityContext parentContext = default, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default, string name = "") { throw null; } + + public Activity? StartActivity(string name, ActivityKind kind, ActivityContext parentContext, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default) { throw null; } + + public Activity? StartActivity(string name, ActivityKind kind, string? parentId, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default) { throw null; } + + public Activity? StartActivity(string name = "", ActivityKind kind = ActivityKind.Internal) { throw null; } + } + + public readonly partial struct ActivitySpanId : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public readonly void CopyTo(Span destination) { } + + public static ActivitySpanId CreateFromBytes(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateFromString(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateFromUtf8String(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateRandom() { throw null; } + + public readonly bool Equals(ActivitySpanId spanId) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivitySpanId spanId1, ActivitySpanId spandId2) { throw null; } + + public static bool operator !=(ActivitySpanId spanId1, ActivitySpanId spandId2) { throw null; } + + public readonly string ToHexString() { throw null; } + + public override readonly string ToString() { throw null; } + } + + public enum ActivityStatusCode + { + Unset = 0, + Ok = 1, + Error = 2 + } + + public partial class ActivityTagsCollection : Collections.Generic.IDictionary, Collections.Generic.ICollection>, Collections.Generic.IEnumerable>, Collections.IEnumerable + { + public ActivityTagsCollection() { } + + public ActivityTagsCollection(Collections.Generic.IEnumerable> list) { } + + public int Count { get { throw null; } } + + public bool IsReadOnly { get { throw null; } } + + public object? this[string key] { get { throw null; } set { } } + + public Collections.Generic.ICollection Keys { get { throw null; } } + + public Collections.Generic.ICollection Values { get { throw null; } } + + public void Add(Collections.Generic.KeyValuePair item) { } + + public void Add(string key, object? value) { } + + public void Clear() { } + + public bool Contains(Collections.Generic.KeyValuePair item) { throw null; } + + public bool ContainsKey(string key) { throw null; } + + public void CopyTo(Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + + public Enumerator GetEnumerator() { throw null; } + + public bool Remove(Collections.Generic.KeyValuePair item) { throw null; } + + public bool Remove(string key) { throw null; } + + Collections.Generic.IEnumerator> Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + + Collections.IEnumerator Collections.IEnumerable.GetEnumerator() { throw null; } + + public bool TryGetValue(string key, out object? value) { throw null; } + + public partial struct Enumerator : Collections.Generic.IEnumerator>, Collections.IEnumerator, IDisposable + { + public Collections.Generic.KeyValuePair Current { get { throw null; } } + + object Collections.IEnumerator.Current { get { throw null; } } + + public void Dispose() { } + + public bool MoveNext() { throw null; } + + void Collections.IEnumerator.Reset() { } + } + } + + [Flags] + public enum ActivityTraceFlags + { + None = 0, + Recorded = 1 + } + + public readonly partial struct ActivityTraceId : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public readonly void CopyTo(Span destination) { } + + public static ActivityTraceId CreateFromBytes(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateFromString(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateFromUtf8String(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateRandom() { throw null; } + + public readonly bool Equals(ActivityTraceId traceId) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityTraceId traceId1, ActivityTraceId traceId2) { throw null; } + + public static bool operator !=(ActivityTraceId traceId1, ActivityTraceId traceId2) { throw null; } + + public readonly string ToHexString() { throw null; } + + public override readonly string ToString() { throw null; } + } + + public partial class DiagnosticListener : DiagnosticSource, IObservable>, IDisposable + { + public DiagnosticListener(string name) { } + + public static IObservable AllListeners { get { throw null; } } + + public string Name { get { throw null; } } + + public virtual void Dispose() { } + + public bool IsEnabled() { throw null; } + + public override bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; } + + public override bool IsEnabled(string name) { throw null; } + + public override void OnActivityExport(Activity activity, object? payload) { } + + public override void OnActivityImport(Activity activity, object? payload) { } + + public virtual IDisposable Subscribe(IObserver> observer, Func? isEnabled, Action? onActivityImport = null, Action? onActivityExport = null) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer, Func? isEnabled) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer, Predicate? isEnabled) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer) { throw null; } + + public override string ToString() { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public override void Write(string name, object? value) { } + } + + public abstract partial class DiagnosticSource + { + public virtual bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; } + + public abstract bool IsEnabled(string name); + public virtual void OnActivityExport(Activity activity, object? payload) { } + + public virtual void OnActivityImport(Activity activity, object? payload) { } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public Activity StartActivity(Activity activity, object? args) { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public Activity StartActivity(Activity activity, T args) { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public void StopActivity(Activity activity, object? args) { } + + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public void StopActivity(Activity activity, T args) { } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public abstract void Write(string name, object? value); + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public void Write(string name, T value) { } + } + + public abstract partial class DistributedContextPropagator + { + public static DistributedContextPropagator Current { get { throw null; } set { } } + + public abstract Collections.Generic.IReadOnlyCollection Fields { get; } + + public static DistributedContextPropagator CreateDefaultPropagator() { throw null; } + + public static DistributedContextPropagator CreateNoOutputPropagator() { throw null; } + + public static DistributedContextPropagator CreatePassThroughPropagator() { throw null; } + + public abstract Collections.Generic.IEnumerable>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter); + public abstract void ExtractTraceIdAndState(object? carrier, PropagatorGetterCallback? getter, out string? traceId, out string? traceState); + public abstract void Inject(Activity? activity, object? carrier, PropagatorSetterCallback? setter); + public delegate void PropagatorGetterCallback(object? carrier, string fieldName, out string? fieldValue, out Collections.Generic.IEnumerable? fieldValues); + public delegate void PropagatorSetterCallback(object? carrier, string fieldName, string fieldValue); + } + + public delegate ActivitySamplingResult SampleActivity(ref ActivityCreationOptions options); + public partial struct TagList : Collections.Generic.IList>, Collections.Generic.ICollection>, Collections.Generic.IEnumerable>, Collections.IEnumerable, Collections.Generic.IReadOnlyList>, Collections.Generic.IReadOnlyCollection> + { + private object _dummy; + private int _dummyPrimitive; + public TagList(ReadOnlySpan> tagList) { } + + public int Count { get { throw null; } } + + public bool IsReadOnly { get { throw null; } } + + public Collections.Generic.KeyValuePair this[int index] { get { throw null; } set { } } + + public void Add(Collections.Generic.KeyValuePair tag) { } + + public void Add(string key, object? value) { } + + public void Clear() { } + + public readonly bool Contains(Collections.Generic.KeyValuePair item) { throw null; } + + public readonly void CopyTo(Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + + public readonly void CopyTo(Span> tags) { } + + public readonly Collections.Generic.IEnumerator> GetEnumerator() { throw null; } + + public readonly int IndexOf(Collections.Generic.KeyValuePair item) { throw null; } + + public void Insert(int index, Collections.Generic.KeyValuePair item) { } + + public bool Remove(Collections.Generic.KeyValuePair item) { throw null; } + + public void RemoveAt(int index) { } + + readonly Collections.IEnumerator Collections.IEnumerable.GetEnumerator() { throw null; } + + public partial struct Enumerator : Collections.Generic.IEnumerator>, Collections.IEnumerator, IDisposable + { + private int _dummyPrimitive; + public Collections.Generic.KeyValuePair Current { get { throw null; } } + + object Collections.IEnumerator.Current { get { throw null; } } + + public void Dispose() { } + + public bool MoveNext() { throw null; } + + public void Reset() { } + } + } +} + +namespace System.Diagnostics.Metrics +{ + public sealed partial class Counter : Instrument where T : struct + { + internal Counter() : base(default!, default!, default, default) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag) { } + + public void Add(T delta, params Collections.Generic.KeyValuePair[] tags) { } + + public void Add(T delta, in TagList tagList) { } + + public void Add(T delta, ReadOnlySpan> tags) { } + + public void Add(T delta) { } + } + + public sealed partial class Histogram : Instrument where T : struct + { + internal Histogram() : base(default!, default!, default, default) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag) { } + + public void Record(T value, params Collections.Generic.KeyValuePair[] tags) { } + + public void Record(T value, in TagList tagList) { } + + public void Record(T value, ReadOnlySpan> tags) { } + + public void Record(T value) { } + } + + public partial interface IMeterFactory : IDisposable + { + Meter Create(MeterOptions options); + } + + public abstract partial class Instrument + { + protected Instrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) { } + + protected Instrument(Meter meter, string name, string? unit, string? description) { } + + public string? Description { get { throw null; } } + + public bool Enabled { get { throw null; } } + + public virtual bool IsObservable { get { throw null; } } + + public Meter Meter { get { throw null; } } + + public string Name { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public string? Unit { get { throw null; } } + + protected void Publish() { } + } + + public abstract partial class Instrument : Instrument where T : struct + { + protected Instrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) : base(default!, default!, default, default) { } + + protected Instrument(Meter meter, string name, string? unit, string? description) : base(default!, default!, default, default) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag) { } + + protected void RecordMeasurement(T measurement, in TagList tagList) { } + + protected void RecordMeasurement(T measurement, ReadOnlySpan> tags) { } + + protected void RecordMeasurement(T measurement) { } + } + + public delegate void MeasurementCallback(Instrument instrument, T measurement, ReadOnlySpan> tags, object? state) + where T : struct; + public readonly partial struct Measurement + where T : struct + { + private readonly T _Value_k__BackingField; + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Measurement(T value, Collections.Generic.IEnumerable>? tags) { } + + public Measurement(T value, params Collections.Generic.KeyValuePair[]? tags) { } + + public Measurement(T value, ReadOnlySpan> tags) { } + + public Measurement(T value) { } + + public ReadOnlySpan> Tags { get { throw null; } } + + public T Value { get { throw null; } } + } + + public partial class Meter : IDisposable + { + public Meter(MeterOptions options) { } + + public Meter(string name, string? version, Collections.Generic.IEnumerable>? tags, object? scope = null) { } + + public Meter(string name, string? version) { } + + public Meter(string name) { } + + public string Name { get { throw null; } } + + public object? Scope { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public string? Version { get { throw null; } } + + public Counter CreateCounter(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public Counter CreateCounter(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public Histogram CreateHistogram(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public Histogram CreateHistogram(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public UpDownCounter CreateUpDownCounter(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public UpDownCounter CreateUpDownCounter(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public void Dispose() { } + + protected virtual void Dispose(bool disposing) { } + } + + public static partial class MeterFactoryExtensions + { + public static Meter Create(this IMeterFactory meterFactory, string name, string? version = null, Collections.Generic.IEnumerable>? tags = null) { throw null; } + } + + public sealed partial class MeterListener : IDisposable + { + public Action? InstrumentPublished { get { throw null; } set { } } + + public Action? MeasurementsCompleted { get { throw null; } set { } } + + public object? DisableMeasurementEvents(Instrument instrument) { throw null; } + + public void Dispose() { } + + public void EnableMeasurementEvents(Instrument instrument, object? state = null) { } + + public void RecordObservableInstruments() { } + + public void SetMeasurementEventCallback(MeasurementCallback? measurementCallback) + where T : struct { } + + public void Start() { } + } + + public partial class MeterOptions + { + public MeterOptions(string name) { } + + public string Name { get { throw null; } set { } } + + public object? Scope { get { throw null; } set { } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } set { } } + + public string? Version { get { throw null; } set { } } + } + + public sealed partial class ObservableCounter : ObservableInstrument where T : struct + { + internal ObservableCounter() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public sealed partial class ObservableGauge : ObservableInstrument where T : struct + { + internal ObservableGauge() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public abstract partial class ObservableInstrument : Instrument where T : struct + { + protected ObservableInstrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) : base(default!, default!, default, default) { } + + protected ObservableInstrument(Meter meter, string name, string? unit, string? description) : base(default!, default!, default, default) { } + + public override bool IsObservable { get { throw null; } } + + protected abstract Collections.Generic.IEnumerable> Observe(); + } + + public sealed partial class ObservableUpDownCounter : ObservableInstrument where T : struct + { + internal ObservableUpDownCounter() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public sealed partial class UpDownCounter : Instrument where T : struct + { + internal UpDownCounter() : base(default!, default!, default, default) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag) { } + + public void Add(T delta, params Collections.Generic.KeyValuePair[] tags) { } + + public void Add(T delta, in TagList tagList) { } + + public void Add(T delta, ReadOnlySpan> tags) { } + + public void Add(T delta) { } + } +} \ No newline at end of file diff --git a/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.cs b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.cs new file mode 100644 index 0000000000..abad76a6b2 --- /dev/null +++ b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/net8.0/System.Diagnostics.DiagnosticSource.cs @@ -0,0 +1,884 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ +[assembly: System.Runtime.CompilerServices.CompilationRelaxations(8)] +[assembly: System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows = true)] +[assembly: System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] +[assembly: System.Reflection.AssemblyMetadata("Serviceable", "True")] +[assembly: System.Reflection.AssemblyMetadata("PreferInbox", "True")] +[assembly: System.Reflection.AssemblyDefaultAlias("System.Diagnostics.DiagnosticSource")] +[assembly: System.Resources.NeutralResourcesLanguage("en-US")] +[assembly: System.CLSCompliant(true)] +[assembly: System.Reflection.AssemblyMetadata("IsTrimmable", "True")] +[assembly: System.Runtime.InteropServices.DefaultDllImportSearchPaths(System.Runtime.InteropServices.DllImportSearchPath.AssemblyDirectory | System.Runtime.InteropServices.DllImportSearchPath.System32)] +[assembly: System.Reflection.AssemblyCompany("Microsoft Corporation")] +[assembly: System.Reflection.AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] +[assembly: System.Reflection.AssemblyDescription("Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools)\r\n\r\nCommonly Used Types:\r\nSystem.Diagnostics.DiagnosticListener\r\nSystem.Diagnostics.DiagnosticSource")] +[assembly: System.Reflection.AssemblyFileVersion("8.0.23.53103")] +[assembly: System.Reflection.AssemblyInformationalVersion("8.0.0+5535e31a712343a63f5d7d796cd874e563e5ac14")] +[assembly: System.Reflection.AssemblyProduct("Microsoft® .NET")] +[assembly: System.Reflection.AssemblyTitle("System.Diagnostics.DiagnosticSource")] +[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/dotnet/runtime")] +[assembly: System.Reflection.AssemblyVersionAttribute("8.0.0.0")] +[assembly: System.Runtime.CompilerServices.ReferenceAssembly] +[assembly: System.Reflection.AssemblyFlagsAttribute((System.Reflection.AssemblyNameFlags)0x70)] +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.IsExternalInit))] +namespace System.Diagnostics +{ + public partial class Activity : IDisposable + { + public Activity(string operationName) { } + + public ActivityTraceFlags ActivityTraceFlags { get { throw null; } set { } } + + public Collections.Generic.IEnumerable> Baggage { get { throw null; } } + + public ActivityContext Context { get { throw null; } } + + public static Activity? Current { get { throw null; } set { } } + + public static ActivityIdFormat DefaultIdFormat { get { throw null; } set { } } + + public string DisplayName { get { throw null; } set { } } + + public TimeSpan Duration { get { throw null; } } + + public Collections.Generic.IEnumerable Events { get { throw null; } } + + public static bool ForceDefaultIdFormat { get { throw null; } set { } } + + public bool HasRemoteParent { get { throw null; } } + + public string? Id { get { throw null; } } + + public ActivityIdFormat IdFormat { get { throw null; } } + + public bool IsAllDataRequested { get { throw null; } set { } } + + public bool IsStopped { get { throw null; } } + + public ActivityKind Kind { get { throw null; } } + + public Collections.Generic.IEnumerable Links { get { throw null; } } + + public string OperationName { get { throw null; } } + + public Activity? Parent { get { throw null; } } + + public string? ParentId { get { throw null; } } + + public ActivitySpanId ParentSpanId { get { throw null; } } + + public bool Recorded { get { throw null; } } + + public string? RootId { get { throw null; } } + + public ActivitySource Source { get { throw null; } } + + public ActivitySpanId SpanId { get { throw null; } } + + public DateTime StartTimeUtc { get { throw null; } } + + public ActivityStatusCode Status { get { throw null; } } + + public string? StatusDescription { get { throw null; } } + + public Collections.Generic.IEnumerable> TagObjects { get { throw null; } } + + public Collections.Generic.IEnumerable> Tags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public static Func? TraceIdGenerator { get { throw null; } set { } } + + public string? TraceStateString { get { throw null; } set { } } + + public static event EventHandler? CurrentChanged { add { } remove { } } + + public Activity AddBaggage(string key, string? value) { throw null; } + + public Activity AddEvent(ActivityEvent e) { throw null; } + + public Activity AddTag(string key, object? value) { throw null; } + + public Activity AddTag(string key, string? value) { throw null; } + + public void Dispose() { } + + protected virtual void Dispose(bool disposing) { } + + public Enumerator EnumerateEvents() { throw null; } + + public Enumerator EnumerateLinks() { throw null; } + + public Enumerator> EnumerateTagObjects() { throw null; } + + public string? GetBaggageItem(string key) { throw null; } + + public object? GetCustomProperty(string propertyName) { throw null; } + + public object? GetTagItem(string key) { throw null; } + + public Activity SetBaggage(string key, string? value) { throw null; } + + public void SetCustomProperty(string propertyName, object? propertyValue) { } + + public Activity SetEndTime(DateTime endTimeUtc) { throw null; } + + public Activity SetIdFormat(ActivityIdFormat format) { throw null; } + + public Activity SetParentId(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags activityTraceFlags = ActivityTraceFlags.None) { throw null; } + + public Activity SetParentId(string parentId) { throw null; } + + public Activity SetStartTime(DateTime startTimeUtc) { throw null; } + + public Activity SetStatus(ActivityStatusCode code, string? description = null) { throw null; } + + public Activity SetTag(string key, object? value) { throw null; } + + public Activity Start() { throw null; } + + public void Stop() { } + + public partial struct Enumerator + { + private object _dummy; + private int _dummyPrimitive; + public ref T Current { get { throw null; } } + + public readonly Enumerator GetEnumerator() { throw null; } + + public bool MoveNext() { throw null; } + } + } + + public readonly partial struct ActivityChangedEventArgs + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Activity? Current { get { throw null; } init { } } + + public Activity? Previous { get { throw null; } init { } } + } + + public readonly partial struct ActivityContext : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityContext(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags traceFlags, string? traceState = null, bool isRemote = false) { } + + public bool IsRemote { get { throw null; } } + + public ActivitySpanId SpanId { get { throw null; } } + + public ActivityTraceFlags TraceFlags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public string? TraceState { get { throw null; } } + + public readonly bool Equals(ActivityContext value) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityContext left, ActivityContext right) { throw null; } + + public static bool operator !=(ActivityContext left, ActivityContext right) { throw null; } + + public static ActivityContext Parse(string traceParent, string? traceState) { throw null; } + + public static bool TryParse(string? traceParent, string? traceState, bool isRemote, out ActivityContext context) { throw null; } + + public static bool TryParse(string? traceParent, string? traceState, out ActivityContext context) { throw null; } + } + + public readonly partial struct ActivityCreationOptions + { + private readonly T _Parent_k__BackingField; + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityKind Kind { get { throw null; } } + + public Collections.Generic.IEnumerable? Links { get { throw null; } } + + public string Name { get { throw null; } } + + public T Parent { get { throw null; } } + + public ActivityTagsCollection SamplingTags { get { throw null; } } + + public ActivitySource Source { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public string? TraceState { get { throw null; } init { } } + } + + public readonly partial struct ActivityEvent + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityEvent(string name, DateTimeOffset timestamp = default, ActivityTagsCollection? tags = null) { } + + public ActivityEvent(string name) { } + + public string Name { get { throw null; } } + + public Collections.Generic.IEnumerable> Tags { get { throw null; } } + + public DateTimeOffset Timestamp { get { throw null; } } + + public readonly Activity.Enumerator> EnumerateTagObjects() { throw null; } + } + + public enum ActivityIdFormat + { + Unknown = 0, + Hierarchical = 1, + W3C = 2 + } + + public enum ActivityKind + { + Internal = 0, + Server = 1, + Client = 2, + Producer = 3, + Consumer = 4 + } + + public readonly partial struct ActivityLink : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityLink(ActivityContext context, ActivityTagsCollection? tags = null) { } + + public ActivityContext Context { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public readonly Activity.Enumerator> EnumerateTagObjects() { throw null; } + + public readonly bool Equals(ActivityLink value) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityLink left, ActivityLink right) { throw null; } + + public static bool operator !=(ActivityLink left, ActivityLink right) { throw null; } + } + + public sealed partial class ActivityListener : IDisposable + { + public Action? ActivityStarted { get { throw null; } set { } } + + public Action? ActivityStopped { get { throw null; } set { } } + + public SampleActivity? Sample { get { throw null; } set { } } + + public SampleActivity? SampleUsingParentId { get { throw null; } set { } } + + public Func? ShouldListenTo { get { throw null; } set { } } + + public void Dispose() { } + } + + public enum ActivitySamplingResult + { + None = 0, + PropagationData = 1, + AllData = 2, + AllDataAndRecorded = 3 + } + + public sealed partial class ActivitySource : IDisposable + { + public ActivitySource(string name, string? version = "") { } + + public string Name { get { throw null; } } + + public string? Version { get { throw null; } } + + public static void AddActivityListener(ActivityListener listener) { } + + public Activity? CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) { throw null; } + + public Activity? CreateActivity(string name, ActivityKind kind, string? parentId, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) { throw null; } + + public Activity? CreateActivity(string name, ActivityKind kind) { throw null; } + + public void Dispose() { } + + public bool HasListeners() { throw null; } + + public Activity? StartActivity(ActivityKind kind, ActivityContext parentContext = default, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default, string name = "") { throw null; } + + public Activity? StartActivity(string name, ActivityKind kind, ActivityContext parentContext, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default) { throw null; } + + public Activity? StartActivity(string name, ActivityKind kind, string? parentId, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default) { throw null; } + + public Activity? StartActivity(string name = "", ActivityKind kind = ActivityKind.Internal) { throw null; } + } + + public readonly partial struct ActivitySpanId : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public readonly void CopyTo(Span destination) { } + + public static ActivitySpanId CreateFromBytes(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateFromString(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateFromUtf8String(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateRandom() { throw null; } + + public readonly bool Equals(ActivitySpanId spanId) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivitySpanId spanId1, ActivitySpanId spandId2) { throw null; } + + public static bool operator !=(ActivitySpanId spanId1, ActivitySpanId spandId2) { throw null; } + + public readonly string ToHexString() { throw null; } + + public override readonly string ToString() { throw null; } + } + + public enum ActivityStatusCode + { + Unset = 0, + Ok = 1, + Error = 2 + } + + public partial class ActivityTagsCollection : Collections.Generic.IDictionary, Collections.Generic.ICollection>, Collections.Generic.IEnumerable>, Collections.IEnumerable + { + public ActivityTagsCollection() { } + + public ActivityTagsCollection(Collections.Generic.IEnumerable> list) { } + + public int Count { get { throw null; } } + + public bool IsReadOnly { get { throw null; } } + + public object? this[string key] { get { throw null; } set { } } + + public Collections.Generic.ICollection Keys { get { throw null; } } + + public Collections.Generic.ICollection Values { get { throw null; } } + + public void Add(Collections.Generic.KeyValuePair item) { } + + public void Add(string key, object? value) { } + + public void Clear() { } + + public bool Contains(Collections.Generic.KeyValuePair item) { throw null; } + + public bool ContainsKey(string key) { throw null; } + + public void CopyTo(Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + + public Enumerator GetEnumerator() { throw null; } + + public bool Remove(Collections.Generic.KeyValuePair item) { throw null; } + + public bool Remove(string key) { throw null; } + + Collections.Generic.IEnumerator> Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + + Collections.IEnumerator Collections.IEnumerable.GetEnumerator() { throw null; } + + public bool TryGetValue(string key, out object? value) { throw null; } + + public partial struct Enumerator : Collections.Generic.IEnumerator>, Collections.IEnumerator, IDisposable + { + public Collections.Generic.KeyValuePair Current { get { throw null; } } + + object Collections.IEnumerator.Current { get { throw null; } } + + public void Dispose() { } + + public bool MoveNext() { throw null; } + + void Collections.IEnumerator.Reset() { } + } + } + + [Flags] + public enum ActivityTraceFlags + { + None = 0, + Recorded = 1 + } + + public readonly partial struct ActivityTraceId : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public readonly void CopyTo(Span destination) { } + + public static ActivityTraceId CreateFromBytes(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateFromString(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateFromUtf8String(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateRandom() { throw null; } + + public readonly bool Equals(ActivityTraceId traceId) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityTraceId traceId1, ActivityTraceId traceId2) { throw null; } + + public static bool operator !=(ActivityTraceId traceId1, ActivityTraceId traceId2) { throw null; } + + public readonly string ToHexString() { throw null; } + + public override readonly string ToString() { throw null; } + } + + public partial class DiagnosticListener : DiagnosticSource, IObservable>, IDisposable + { + public DiagnosticListener(string name) { } + + public static IObservable AllListeners { get { throw null; } } + + public string Name { get { throw null; } } + + public virtual void Dispose() { } + + public bool IsEnabled() { throw null; } + + public override bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; } + + public override bool IsEnabled(string name) { throw null; } + + public override void OnActivityExport(Activity activity, object? payload) { } + + public override void OnActivityImport(Activity activity, object? payload) { } + + public virtual IDisposable Subscribe(IObserver> observer, Func? isEnabled, Action? onActivityImport = null, Action? onActivityExport = null) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer, Func? isEnabled) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer, Predicate? isEnabled) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer) { throw null; } + + public override string ToString() { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public override void Write(string name, object? value) { } + } + + public abstract partial class DiagnosticSource + { + public virtual bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; } + + public abstract bool IsEnabled(string name); + public virtual void OnActivityExport(Activity activity, object? payload) { } + + public virtual void OnActivityImport(Activity activity, object? payload) { } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public Activity StartActivity(Activity activity, object? args) { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public Activity StartActivity(Activity activity, T args) { throw null; } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public void StopActivity(Activity activity, object? args) { } + + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public void StopActivity(Activity activity, T args) { } + + [CodeAnalysis.RequiresUnreferencedCode("The type of object being written to DiagnosticSource cannot be discovered statically.")] + public abstract void Write(string name, object? value); + [CodeAnalysis.RequiresUnreferencedCode("Only the properties of the T type will be preserved. Properties of referenced types and properties of derived types may be trimmed.")] + public void Write(string name, T value) { } + } + + public abstract partial class DistributedContextPropagator + { + public static DistributedContextPropagator Current { get { throw null; } set { } } + + public abstract Collections.Generic.IReadOnlyCollection Fields { get; } + + public static DistributedContextPropagator CreateDefaultPropagator() { throw null; } + + public static DistributedContextPropagator CreateNoOutputPropagator() { throw null; } + + public static DistributedContextPropagator CreatePassThroughPropagator() { throw null; } + + public abstract Collections.Generic.IEnumerable>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter); + public abstract void ExtractTraceIdAndState(object? carrier, PropagatorGetterCallback? getter, out string? traceId, out string? traceState); + public abstract void Inject(Activity? activity, object? carrier, PropagatorSetterCallback? setter); + public delegate void PropagatorGetterCallback(object? carrier, string fieldName, out string? fieldValue, out Collections.Generic.IEnumerable? fieldValues); + public delegate void PropagatorSetterCallback(object? carrier, string fieldName, string fieldValue); + } + + public delegate ActivitySamplingResult SampleActivity(ref ActivityCreationOptions options); + public partial struct TagList : Collections.Generic.IList>, Collections.Generic.ICollection>, Collections.Generic.IEnumerable>, Collections.IEnumerable, Collections.Generic.IReadOnlyList>, Collections.Generic.IReadOnlyCollection> + { + private object _dummy; + private int _dummyPrimitive; + public TagList(ReadOnlySpan> tagList) { } + + public int Count { get { throw null; } } + + public bool IsReadOnly { get { throw null; } } + + public Collections.Generic.KeyValuePair this[int index] { get { throw null; } set { } } + + public void Add(Collections.Generic.KeyValuePair tag) { } + + public void Add(string key, object? value) { } + + public void Clear() { } + + public readonly bool Contains(Collections.Generic.KeyValuePair item) { throw null; } + + public readonly void CopyTo(Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + + public readonly void CopyTo(Span> tags) { } + + public readonly Collections.Generic.IEnumerator> GetEnumerator() { throw null; } + + public readonly int IndexOf(Collections.Generic.KeyValuePair item) { throw null; } + + public void Insert(int index, Collections.Generic.KeyValuePair item) { } + + public bool Remove(Collections.Generic.KeyValuePair item) { throw null; } + + public void RemoveAt(int index) { } + + readonly Collections.IEnumerator Collections.IEnumerable.GetEnumerator() { throw null; } + + public partial struct Enumerator : Collections.Generic.IEnumerator>, Collections.IEnumerator, IDisposable + { + private int _dummyPrimitive; + public Collections.Generic.KeyValuePair Current { get { throw null; } } + + object Collections.IEnumerator.Current { get { throw null; } } + + public void Dispose() { } + + public bool MoveNext() { throw null; } + + public void Reset() { } + } + } +} + +namespace System.Diagnostics.Metrics +{ + public sealed partial class Counter : Instrument where T : struct + { + internal Counter() : base(default!, default!, default, default) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag) { } + + public void Add(T delta, params Collections.Generic.KeyValuePair[] tags) { } + + public void Add(T delta, in TagList tagList) { } + + public void Add(T delta, ReadOnlySpan> tags) { } + + public void Add(T delta) { } + } + + public sealed partial class Histogram : Instrument where T : struct + { + internal Histogram() : base(default!, default!, default, default) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag) { } + + public void Record(T value, params Collections.Generic.KeyValuePair[] tags) { } + + public void Record(T value, in TagList tagList) { } + + public void Record(T value, ReadOnlySpan> tags) { } + + public void Record(T value) { } + } + + public partial interface IMeterFactory : IDisposable + { + Meter Create(MeterOptions options); + } + + public abstract partial class Instrument + { + protected Instrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) { } + + protected Instrument(Meter meter, string name, string? unit, string? description) { } + + public string? Description { get { throw null; } } + + public bool Enabled { get { throw null; } } + + public virtual bool IsObservable { get { throw null; } } + + public Meter Meter { get { throw null; } } + + public string Name { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public string? Unit { get { throw null; } } + + protected void Publish() { } + } + + public abstract partial class Instrument : Instrument where T : struct + { + protected Instrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) : base(default!, default!, default, default) { } + + protected Instrument(Meter meter, string name, string? unit, string? description) : base(default!, default!, default, default) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag) { } + + protected void RecordMeasurement(T measurement, in TagList tagList) { } + + protected void RecordMeasurement(T measurement, ReadOnlySpan> tags) { } + + protected void RecordMeasurement(T measurement) { } + } + + public delegate void MeasurementCallback(Instrument instrument, T measurement, ReadOnlySpan> tags, object? state) + where T : struct; + public readonly partial struct Measurement + where T : struct + { + private readonly T _Value_k__BackingField; + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Measurement(T value, Collections.Generic.IEnumerable>? tags) { } + + public Measurement(T value, params Collections.Generic.KeyValuePair[]? tags) { } + + public Measurement(T value, ReadOnlySpan> tags) { } + + public Measurement(T value) { } + + public ReadOnlySpan> Tags { get { throw null; } } + + public T Value { get { throw null; } } + } + + public partial class Meter : IDisposable + { + public Meter(MeterOptions options) { } + + public Meter(string name, string? version, Collections.Generic.IEnumerable>? tags, object? scope = null) { } + + public Meter(string name, string? version) { } + + public Meter(string name) { } + + public string Name { get { throw null; } } + + public object? Scope { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public string? Version { get { throw null; } } + + public Counter CreateCounter(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public Counter CreateCounter(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public Histogram CreateHistogram(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public Histogram CreateHistogram(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public UpDownCounter CreateUpDownCounter(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public UpDownCounter CreateUpDownCounter(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public void Dispose() { } + + protected virtual void Dispose(bool disposing) { } + } + + public static partial class MeterFactoryExtensions + { + public static Meter Create(this IMeterFactory meterFactory, string name, string? version = null, Collections.Generic.IEnumerable>? tags = null) { throw null; } + } + + public sealed partial class MeterListener : IDisposable + { + public Action? InstrumentPublished { get { throw null; } set { } } + + public Action? MeasurementsCompleted { get { throw null; } set { } } + + public object? DisableMeasurementEvents(Instrument instrument) { throw null; } + + public void Dispose() { } + + public void EnableMeasurementEvents(Instrument instrument, object? state = null) { } + + public void RecordObservableInstruments() { } + + public void SetMeasurementEventCallback(MeasurementCallback? measurementCallback) + where T : struct { } + + public void Start() { } + } + + public partial class MeterOptions + { + public MeterOptions(string name) { } + + public string Name { get { throw null; } set { } } + + public object? Scope { get { throw null; } set { } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } set { } } + + public string? Version { get { throw null; } set { } } + } + + public sealed partial class ObservableCounter : ObservableInstrument where T : struct + { + internal ObservableCounter() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public sealed partial class ObservableGauge : ObservableInstrument where T : struct + { + internal ObservableGauge() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public abstract partial class ObservableInstrument : Instrument where T : struct + { + protected ObservableInstrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) : base(default!, default!, default, default) { } + + protected ObservableInstrument(Meter meter, string name, string? unit, string? description) : base(default!, default!, default, default) { } + + public override bool IsObservable { get { throw null; } } + + protected abstract Collections.Generic.IEnumerable> Observe(); + } + + public sealed partial class ObservableUpDownCounter : ObservableInstrument where T : struct + { + internal ObservableUpDownCounter() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public sealed partial class UpDownCounter : Instrument where T : struct + { + internal UpDownCounter() : base(default!, default!, default, default) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag) { } + + public void Add(T delta, params Collections.Generic.KeyValuePair[] tags) { } + + public void Add(T delta, in TagList tagList) { } + + public void Add(T delta, ReadOnlySpan> tags) { } + + public void Add(T delta) { } + } +} \ No newline at end of file diff --git a/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.cs b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.cs new file mode 100644 index 0000000000..225196e8d9 --- /dev/null +++ b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/lib/netstandard2.0/System.Diagnostics.DiagnosticSource.cs @@ -0,0 +1,877 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// ------------------------------------------------------------------------------ +// Changes to this file must follow the http://aka.ms/api-review process. +// ------------------------------------------------------------------------------ +[assembly: System.Runtime.CompilerServices.CompilationRelaxations(8)] +[assembly: System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows = true)] +[assembly: System.Diagnostics.Debuggable(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] +[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] +[assembly: System.Reflection.AssemblyMetadata("Serviceable", "True")] +[assembly: System.Reflection.AssemblyMetadata("PreferInbox", "True")] +[assembly: System.Reflection.AssemblyDefaultAlias("System.Diagnostics.DiagnosticSource")] +[assembly: System.Resources.NeutralResourcesLanguage("en-US")] +[assembly: System.CLSCompliant(true)] +[assembly: System.Reflection.AssemblyMetadata("IsTrimmable", "True")] +[assembly: System.Runtime.InteropServices.DefaultDllImportSearchPaths(System.Runtime.InteropServices.DllImportSearchPath.AssemblyDirectory | System.Runtime.InteropServices.DllImportSearchPath.System32)] +[assembly: System.Reflection.AssemblyCompany("Microsoft Corporation")] +[assembly: System.Reflection.AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] +[assembly: System.Reflection.AssemblyDescription("Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools)\r\n\r\nCommonly Used Types:\r\nSystem.Diagnostics.DiagnosticListener\r\nSystem.Diagnostics.DiagnosticSource")] +[assembly: System.Reflection.AssemblyFileVersion("8.0.23.53103")] +[assembly: System.Reflection.AssemblyInformationalVersion("8.0.0+5535e31a712343a63f5d7d796cd874e563e5ac14")] +[assembly: System.Reflection.AssemblyProduct("Microsoft® .NET")] +[assembly: System.Reflection.AssemblyTitle("System.Diagnostics.DiagnosticSource")] +[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/dotnet/runtime")] +[assembly: System.Reflection.AssemblyVersionAttribute("8.0.0.0")] +[assembly: System.Runtime.CompilerServices.ReferenceAssembly] +[assembly: System.Reflection.AssemblyFlagsAttribute((System.Reflection.AssemblyNameFlags)0x70)] +namespace System.Diagnostics +{ + public partial class Activity : IDisposable + { + public Activity(string operationName) { } + + public ActivityTraceFlags ActivityTraceFlags { get { throw null; } set { } } + + public Collections.Generic.IEnumerable> Baggage { get { throw null; } } + + public ActivityContext Context { get { throw null; } } + + public static Activity? Current { get { throw null; } set { } } + + public static ActivityIdFormat DefaultIdFormat { get { throw null; } set { } } + + public string DisplayName { get { throw null; } set { } } + + public TimeSpan Duration { get { throw null; } } + + public Collections.Generic.IEnumerable Events { get { throw null; } } + + public static bool ForceDefaultIdFormat { get { throw null; } set { } } + + public bool HasRemoteParent { get { throw null; } } + + public string? Id { get { throw null; } } + + public ActivityIdFormat IdFormat { get { throw null; } } + + public bool IsAllDataRequested { get { throw null; } set { } } + + public bool IsStopped { get { throw null; } } + + public ActivityKind Kind { get { throw null; } } + + public Collections.Generic.IEnumerable Links { get { throw null; } } + + public string OperationName { get { throw null; } } + + public Activity? Parent { get { throw null; } } + + public string? ParentId { get { throw null; } } + + public ActivitySpanId ParentSpanId { get { throw null; } } + + public bool Recorded { get { throw null; } } + + public string? RootId { get { throw null; } } + + public ActivitySource Source { get { throw null; } } + + public ActivitySpanId SpanId { get { throw null; } } + + public DateTime StartTimeUtc { get { throw null; } } + + public ActivityStatusCode Status { get { throw null; } } + + public string? StatusDescription { get { throw null; } } + + public Collections.Generic.IEnumerable> TagObjects { get { throw null; } } + + public Collections.Generic.IEnumerable> Tags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public static Func? TraceIdGenerator { get { throw null; } set { } } + + public string? TraceStateString { get { throw null; } set { } } + + public static event EventHandler? CurrentChanged { add { } remove { } } + + public Activity AddBaggage(string key, string? value) { throw null; } + + public Activity AddEvent(ActivityEvent e) { throw null; } + + public Activity AddTag(string key, object? value) { throw null; } + + public Activity AddTag(string key, string? value) { throw null; } + + public void Dispose() { } + + protected virtual void Dispose(bool disposing) { } + + public Enumerator EnumerateEvents() { throw null; } + + public Enumerator EnumerateLinks() { throw null; } + + public Enumerator> EnumerateTagObjects() { throw null; } + + public string? GetBaggageItem(string key) { throw null; } + + public object? GetCustomProperty(string propertyName) { throw null; } + + public object? GetTagItem(string key) { throw null; } + + public Activity SetBaggage(string key, string? value) { throw null; } + + public void SetCustomProperty(string propertyName, object? propertyValue) { } + + public Activity SetEndTime(DateTime endTimeUtc) { throw null; } + + public Activity SetIdFormat(ActivityIdFormat format) { throw null; } + + public Activity SetParentId(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags activityTraceFlags = ActivityTraceFlags.None) { throw null; } + + public Activity SetParentId(string parentId) { throw null; } + + public Activity SetStartTime(DateTime startTimeUtc) { throw null; } + + public Activity SetStatus(ActivityStatusCode code, string? description = null) { throw null; } + + public Activity SetTag(string key, object? value) { throw null; } + + public Activity Start() { throw null; } + + public void Stop() { } + + public partial struct Enumerator + { + private object _dummy; + private int _dummyPrimitive; + public ref T Current { get { throw null; } } + + public readonly Enumerator GetEnumerator() { throw null; } + + public bool MoveNext() { throw null; } + } + } + + public readonly partial struct ActivityChangedEventArgs + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Activity? Current { get { throw null; } set { } } + + public Activity? Previous { get { throw null; } set { } } + } + + public readonly partial struct ActivityContext : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityContext(ActivityTraceId traceId, ActivitySpanId spanId, ActivityTraceFlags traceFlags, string? traceState = null, bool isRemote = false) { } + + public bool IsRemote { get { throw null; } } + + public ActivitySpanId SpanId { get { throw null; } } + + public ActivityTraceFlags TraceFlags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public string? TraceState { get { throw null; } } + + public readonly bool Equals(ActivityContext value) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityContext left, ActivityContext right) { throw null; } + + public static bool operator !=(ActivityContext left, ActivityContext right) { throw null; } + + public static ActivityContext Parse(string traceParent, string? traceState) { throw null; } + + public static bool TryParse(string? traceParent, string? traceState, bool isRemote, out ActivityContext context) { throw null; } + + public static bool TryParse(string? traceParent, string? traceState, out ActivityContext context) { throw null; } + } + + public readonly partial struct ActivityCreationOptions + { + private readonly T _Parent_k__BackingField; + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityKind Kind { get { throw null; } } + + public Collections.Generic.IEnumerable? Links { get { throw null; } } + + public string Name { get { throw null; } } + + public T Parent { get { throw null; } } + + public ActivityTagsCollection SamplingTags { get { throw null; } } + + public ActivitySource Source { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public ActivityTraceId TraceId { get { throw null; } } + + public string? TraceState { get { throw null; } set { } } + } + + public readonly partial struct ActivityEvent + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityEvent(string name, DateTimeOffset timestamp = default, ActivityTagsCollection? tags = null) { } + + public ActivityEvent(string name) { } + + public string Name { get { throw null; } } + + public Collections.Generic.IEnumerable> Tags { get { throw null; } } + + public DateTimeOffset Timestamp { get { throw null; } } + + public readonly Activity.Enumerator> EnumerateTagObjects() { throw null; } + } + + public enum ActivityIdFormat + { + Unknown = 0, + Hierarchical = 1, + W3C = 2 + } + + public enum ActivityKind + { + Internal = 0, + Server = 1, + Client = 2, + Producer = 3, + Consumer = 4 + } + + public readonly partial struct ActivityLink : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ActivityLink(ActivityContext context, ActivityTagsCollection? tags = null) { } + + public ActivityContext Context { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public readonly Activity.Enumerator> EnumerateTagObjects() { throw null; } + + public readonly bool Equals(ActivityLink value) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityLink left, ActivityLink right) { throw null; } + + public static bool operator !=(ActivityLink left, ActivityLink right) { throw null; } + } + + public sealed partial class ActivityListener : IDisposable + { + public Action? ActivityStarted { get { throw null; } set { } } + + public Action? ActivityStopped { get { throw null; } set { } } + + public SampleActivity? Sample { get { throw null; } set { } } + + public SampleActivity? SampleUsingParentId { get { throw null; } set { } } + + public Func? ShouldListenTo { get { throw null; } set { } } + + public void Dispose() { } + } + + public enum ActivitySamplingResult + { + None = 0, + PropagationData = 1, + AllData = 2, + AllDataAndRecorded = 3 + } + + public sealed partial class ActivitySource : IDisposable + { + public ActivitySource(string name, string? version = "") { } + + public string Name { get { throw null; } } + + public string? Version { get { throw null; } } + + public static void AddActivityListener(ActivityListener listener) { } + + public Activity? CreateActivity(string name, ActivityKind kind, ActivityContext parentContext, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) { throw null; } + + public Activity? CreateActivity(string name, ActivityKind kind, string? parentId, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, ActivityIdFormat idFormat = ActivityIdFormat.Unknown) { throw null; } + + public Activity? CreateActivity(string name, ActivityKind kind) { throw null; } + + public void Dispose() { } + + public bool HasListeners() { throw null; } + + public Activity? StartActivity(ActivityKind kind, ActivityContext parentContext = default, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default, string name = "") { throw null; } + + public Activity? StartActivity(string name, ActivityKind kind, ActivityContext parentContext, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default) { throw null; } + + public Activity? StartActivity(string name, ActivityKind kind, string? parentId, Collections.Generic.IEnumerable>? tags = null, Collections.Generic.IEnumerable? links = null, DateTimeOffset startTime = default) { throw null; } + + public Activity? StartActivity(string name = "", ActivityKind kind = ActivityKind.Internal) { throw null; } + } + + public readonly partial struct ActivitySpanId : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public readonly void CopyTo(Span destination) { } + + public static ActivitySpanId CreateFromBytes(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateFromString(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateFromUtf8String(ReadOnlySpan idData) { throw null; } + + public static ActivitySpanId CreateRandom() { throw null; } + + public readonly bool Equals(ActivitySpanId spanId) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivitySpanId spanId1, ActivitySpanId spandId2) { throw null; } + + public static bool operator !=(ActivitySpanId spanId1, ActivitySpanId spandId2) { throw null; } + + public readonly string ToHexString() { throw null; } + + public override readonly string ToString() { throw null; } + } + + public enum ActivityStatusCode + { + Unset = 0, + Ok = 1, + Error = 2 + } + + public partial class ActivityTagsCollection : Collections.Generic.IDictionary, Collections.Generic.ICollection>, Collections.Generic.IEnumerable>, Collections.IEnumerable + { + public ActivityTagsCollection() { } + + public ActivityTagsCollection(Collections.Generic.IEnumerable> list) { } + + public int Count { get { throw null; } } + + public bool IsReadOnly { get { throw null; } } + + public object? this[string key] { get { throw null; } set { } } + + public Collections.Generic.ICollection Keys { get { throw null; } } + + public Collections.Generic.ICollection Values { get { throw null; } } + + public void Add(Collections.Generic.KeyValuePair item) { } + + public void Add(string key, object? value) { } + + public void Clear() { } + + public bool Contains(Collections.Generic.KeyValuePair item) { throw null; } + + public bool ContainsKey(string key) { throw null; } + + public void CopyTo(Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + + public Enumerator GetEnumerator() { throw null; } + + public bool Remove(Collections.Generic.KeyValuePair item) { throw null; } + + public bool Remove(string key) { throw null; } + + Collections.Generic.IEnumerator> Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } + + Collections.IEnumerator Collections.IEnumerable.GetEnumerator() { throw null; } + + public bool TryGetValue(string key, out object? value) { throw null; } + + public partial struct Enumerator : Collections.Generic.IEnumerator>, Collections.IEnumerator, IDisposable + { + private int _dummyPrimitive; + public Collections.Generic.KeyValuePair Current { get { throw null; } } + + object Collections.IEnumerator.Current { get { throw null; } } + + public void Dispose() { } + + public bool MoveNext() { throw null; } + + void Collections.IEnumerator.Reset() { } + } + } + + [Flags] + public enum ActivityTraceFlags + { + None = 0, + Recorded = 1 + } + + public readonly partial struct ActivityTraceId : IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public readonly void CopyTo(Span destination) { } + + public static ActivityTraceId CreateFromBytes(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateFromString(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateFromUtf8String(ReadOnlySpan idData) { throw null; } + + public static ActivityTraceId CreateRandom() { throw null; } + + public readonly bool Equals(ActivityTraceId traceId) { throw null; } + + public override readonly bool Equals(object? obj) { throw null; } + + public override readonly int GetHashCode() { throw null; } + + public static bool operator ==(ActivityTraceId traceId1, ActivityTraceId traceId2) { throw null; } + + public static bool operator !=(ActivityTraceId traceId1, ActivityTraceId traceId2) { throw null; } + + public readonly string ToHexString() { throw null; } + + public override readonly string ToString() { throw null; } + } + + public partial class DiagnosticListener : DiagnosticSource, IObservable>, IDisposable + { + public DiagnosticListener(string name) { } + + public static IObservable AllListeners { get { throw null; } } + + public string Name { get { throw null; } } + + public virtual void Dispose() { } + + public bool IsEnabled() { throw null; } + + public override bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; } + + public override bool IsEnabled(string name) { throw null; } + + public override void OnActivityExport(Activity activity, object? payload) { } + + public override void OnActivityImport(Activity activity, object? payload) { } + + public virtual IDisposable Subscribe(IObserver> observer, Func? isEnabled, Action? onActivityImport = null, Action? onActivityExport = null) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer, Func? isEnabled) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer, Predicate? isEnabled) { throw null; } + + public virtual IDisposable Subscribe(IObserver> observer) { throw null; } + + public override string ToString() { throw null; } + + public override void Write(string name, object? value) { } + } + + public abstract partial class DiagnosticSource + { + public virtual bool IsEnabled(string name, object? arg1, object? arg2 = null) { throw null; } + + public abstract bool IsEnabled(string name); + public virtual void OnActivityExport(Activity activity, object? payload) { } + + public virtual void OnActivityImport(Activity activity, object? payload) { } + + public Activity StartActivity(Activity activity, object? args) { throw null; } + + public Activity StartActivity(Activity activity, T args) { throw null; } + + public void StopActivity(Activity activity, object? args) { } + + public void StopActivity(Activity activity, T args) { } + + public abstract void Write(string name, object? value); + public void Write(string name, T value) { } + } + + public abstract partial class DistributedContextPropagator + { + public static DistributedContextPropagator Current { get { throw null; } set { } } + + public abstract Collections.Generic.IReadOnlyCollection Fields { get; } + + public static DistributedContextPropagator CreateDefaultPropagator() { throw null; } + + public static DistributedContextPropagator CreateNoOutputPropagator() { throw null; } + + public static DistributedContextPropagator CreatePassThroughPropagator() { throw null; } + + public abstract Collections.Generic.IEnumerable>? ExtractBaggage(object? carrier, PropagatorGetterCallback? getter); + public abstract void ExtractTraceIdAndState(object? carrier, PropagatorGetterCallback? getter, out string? traceId, out string? traceState); + public abstract void Inject(Activity? activity, object? carrier, PropagatorSetterCallback? setter); + public delegate void PropagatorGetterCallback(object? carrier, string fieldName, out string? fieldValue, out Collections.Generic.IEnumerable? fieldValues); + public delegate void PropagatorSetterCallback(object? carrier, string fieldName, string fieldValue); + } + + public delegate ActivitySamplingResult SampleActivity(ref ActivityCreationOptions options); + public partial struct TagList : Collections.Generic.IList>, Collections.Generic.ICollection>, Collections.Generic.IEnumerable>, Collections.IEnumerable, Collections.Generic.IReadOnlyList>, Collections.Generic.IReadOnlyCollection> + { + private object _dummy; + private int _dummyPrimitive; + public TagList(ReadOnlySpan> tagList) { } + + public int Count { get { throw null; } } + + public bool IsReadOnly { get { throw null; } } + + public Collections.Generic.KeyValuePair this[int index] { get { throw null; } set { } } + + public void Add(Collections.Generic.KeyValuePair tag) { } + + public void Add(string key, object? value) { } + + public void Clear() { } + + public readonly bool Contains(Collections.Generic.KeyValuePair item) { throw null; } + + public readonly void CopyTo(Collections.Generic.KeyValuePair[] array, int arrayIndex) { } + + public readonly void CopyTo(Span> tags) { } + + public readonly Collections.Generic.IEnumerator> GetEnumerator() { throw null; } + + public readonly int IndexOf(Collections.Generic.KeyValuePair item) { throw null; } + + public void Insert(int index, Collections.Generic.KeyValuePair item) { } + + public bool Remove(Collections.Generic.KeyValuePair item) { throw null; } + + public void RemoveAt(int index) { } + + readonly Collections.IEnumerator Collections.IEnumerable.GetEnumerator() { throw null; } + + public partial struct Enumerator : Collections.Generic.IEnumerator>, Collections.IEnumerator, IDisposable + { + private int _dummyPrimitive; + public Collections.Generic.KeyValuePair Current { get { throw null; } } + + object Collections.IEnumerator.Current { get { throw null; } } + + public void Dispose() { } + + public bool MoveNext() { throw null; } + + public void Reset() { } + } + } +} + +namespace System.Diagnostics.Metrics +{ + public sealed partial class Counter : Instrument where T : struct + { + internal Counter() : base(default!, default!, default, default) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag) { } + + public void Add(T delta, params Collections.Generic.KeyValuePair[] tags) { } + + public void Add(T delta, in TagList tagList) { } + + public void Add(T delta, ReadOnlySpan> tags) { } + + public void Add(T delta) { } + } + + public sealed partial class Histogram : Instrument where T : struct + { + internal Histogram() : base(default!, default!, default, default) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Record(T value, Collections.Generic.KeyValuePair tag) { } + + public void Record(T value, params Collections.Generic.KeyValuePair[] tags) { } + + public void Record(T value, in TagList tagList) { } + + public void Record(T value, ReadOnlySpan> tags) { } + + public void Record(T value) { } + } + + public partial interface IMeterFactory : IDisposable + { + Meter Create(MeterOptions options); + } + + public abstract partial class Instrument + { + protected Instrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) { } + + protected Instrument(Meter meter, string name, string? unit, string? description) { } + + public string? Description { get { throw null; } } + + public bool Enabled { get { throw null; } } + + public virtual bool IsObservable { get { throw null; } } + + public Meter Meter { get { throw null; } } + + public string Name { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public string? Unit { get { throw null; } } + + protected void Publish() { } + } + + public abstract partial class Instrument : Instrument where T : struct + { + protected Instrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) : base(default!, default!, default, default) { } + + protected Instrument(Meter meter, string name, string? unit, string? description) : base(default!, default!, default, default) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + protected void RecordMeasurement(T measurement, Collections.Generic.KeyValuePair tag) { } + + protected void RecordMeasurement(T measurement, in TagList tagList) { } + + protected void RecordMeasurement(T measurement, ReadOnlySpan> tags) { } + + protected void RecordMeasurement(T measurement) { } + } + + public delegate void MeasurementCallback(Instrument instrument, T measurement, ReadOnlySpan> tags, object? state) + where T : struct; + public readonly partial struct Measurement + where T : struct + { + private readonly T _Value_k__BackingField; + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Measurement(T value, Collections.Generic.IEnumerable>? tags) { } + + public Measurement(T value, params Collections.Generic.KeyValuePair[]? tags) { } + + public Measurement(T value, ReadOnlySpan> tags) { } + + public Measurement(T value) { } + + public ReadOnlySpan> Tags { get { throw null; } } + + public T Value { get { throw null; } } + } + + public partial class Meter : IDisposable + { + public Meter(MeterOptions options) { } + + public Meter(string name, string? version, Collections.Generic.IEnumerable>? tags, object? scope = null) { } + + public Meter(string name, string? version) { } + + public Meter(string name) { } + + public string Name { get { throw null; } } + + public object? Scope { get { throw null; } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } } + + public string? Version { get { throw null; } } + + public Counter CreateCounter(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public Counter CreateCounter(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public Histogram CreateHistogram(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public Histogram CreateHistogram(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableCounter CreateObservableCounter(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableGauge CreateObservableGauge(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func>> observeValues, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func>> observeValues, string? unit = null, string? description = null) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func> observeValue, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public ObservableUpDownCounter CreateObservableUpDownCounter(string name, Func> observeValue, string? unit = null, string? description = null) + where T : struct { throw null; } + + public UpDownCounter CreateUpDownCounter(string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) + where T : struct { throw null; } + + public UpDownCounter CreateUpDownCounter(string name, string? unit = null, string? description = null) + where T : struct { throw null; } + + public void Dispose() { } + + protected virtual void Dispose(bool disposing) { } + } + + public static partial class MeterFactoryExtensions + { + public static Meter Create(this IMeterFactory meterFactory, string name, string? version = null, Collections.Generic.IEnumerable>? tags = null) { throw null; } + } + + public sealed partial class MeterListener : IDisposable + { + public Action? InstrumentPublished { get { throw null; } set { } } + + public Action? MeasurementsCompleted { get { throw null; } set { } } + + public object? DisableMeasurementEvents(Instrument instrument) { throw null; } + + public void Dispose() { } + + public void EnableMeasurementEvents(Instrument instrument, object? state = null) { } + + public void RecordObservableInstruments() { } + + public void SetMeasurementEventCallback(MeasurementCallback? measurementCallback) + where T : struct { } + + public void Start() { } + } + + public partial class MeterOptions + { + public MeterOptions(string name) { } + + public string Name { get { throw null; } set { } } + + public object? Scope { get { throw null; } set { } } + + public Collections.Generic.IEnumerable>? Tags { get { throw null; } set { } } + + public string? Version { get { throw null; } set { } } + } + + public sealed partial class ObservableCounter : ObservableInstrument where T : struct + { + internal ObservableCounter() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public sealed partial class ObservableGauge : ObservableInstrument where T : struct + { + internal ObservableGauge() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public abstract partial class ObservableInstrument : Instrument where T : struct + { + protected ObservableInstrument(Meter meter, string name, string? unit, string? description, Collections.Generic.IEnumerable>? tags) : base(default!, default!, default, default) { } + + protected ObservableInstrument(Meter meter, string name, string? unit, string? description) : base(default!, default!, default, default) { } + + public override bool IsObservable { get { throw null; } } + + protected abstract Collections.Generic.IEnumerable> Observe(); + } + + public sealed partial class ObservableUpDownCounter : ObservableInstrument where T : struct + { + internal ObservableUpDownCounter() : base(default!, default!, default, default) { } + + protected override Collections.Generic.IEnumerable> Observe() { throw null; } + } + + public sealed partial class UpDownCounter : Instrument where T : struct + { + internal UpDownCounter() : base(default!, default!, default, default) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2, Collections.Generic.KeyValuePair tag3) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag1, Collections.Generic.KeyValuePair tag2) { } + + public void Add(T delta, Collections.Generic.KeyValuePair tag) { } + + public void Add(T delta, params Collections.Generic.KeyValuePair[] tags) { } + + public void Add(T delta, in TagList tagList) { } + + public void Add(T delta, ReadOnlySpan> tags) { } + + public void Add(T delta) { } + } +} \ No newline at end of file diff --git a/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/system.diagnostics.diagnosticsource.nuspec b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/system.diagnostics.diagnosticsource.nuspec new file mode 100644 index 0000000000..b97e1bd830 --- /dev/null +++ b/src/referencePackages/src/system.diagnostics.diagnosticsource/8.0.0/system.diagnostics.diagnosticsource.nuspec @@ -0,0 +1,31 @@ + + + + System.Diagnostics.DiagnosticSource + 8.0.0 + Microsoft + MIT + https://licenses.nuget.org/MIT + https://dot.net/ + Provides Classes that allow you to decouple code logging rich (unserializable) diagnostics/telemetry (e.g. framework) from code that consumes it (e.g. tools) + +Commonly Used Types: +System.Diagnostics.DiagnosticListener +System.Diagnostics.DiagnosticSource + https://go.microsoft.com/fwlink/?LinkID=799421 + © Microsoft Corporation. All rights reserved. + true + + + + + + + + + + + + + + \ No newline at end of file