Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace System.Diagnostics
{
public partial class Activity
public partial class Activity : IDisposable
{
public Activity(string operationName) { }
public System.Diagnostics.ActivityTraceFlags ActivityTraceFlags { get { throw null; } set { } }
Expand All @@ -33,8 +33,13 @@ public string? Id
#endif
get { throw null; }
}

public bool IsAllDataRequested { get { throw null; } set { throw null; }}
public System.Diagnostics.ActivityIdFormat IdFormat { get { throw null; } }
public System.Diagnostics.ActivityKind Kind { get; }
public string OperationName { get { throw null; } }
public string DisplayName { get { throw null; } set { throw null; } }
public System.Diagnostics.ActivitySource Source { get { throw null; } }
public System.Diagnostics.Activity? Parent { get { throw null; } }
public string? ParentId { get { throw null; } }
public System.Diagnostics.ActivitySpanId ParentSpanId { get { throw null; } }
Expand All @@ -43,9 +48,12 @@ public string? Id
public System.Diagnostics.ActivitySpanId SpanId { get { throw null; } }
public System.DateTime StartTimeUtc { get { throw null; } }
public System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>> Tags { get { throw null; } }
public System.Collections.Generic.IEnumerable<System.Diagnostics.ActivityEvent> Events { get { throw null; } }
public System.Collections.Generic.IEnumerable<System.Diagnostics.ActivityLink> Links { get { throw null; } }
public System.Diagnostics.ActivityTraceId TraceId { get { throw null; } }
public string? TraceStateString { get { throw null; } set { } }
public System.Diagnostics.Activity AddBaggage(string key, string? value) { throw null; }
public System.Diagnostics.Activity AddEvent(System.Diagnostics.ActivityEvent e) { throw null; }
public System.Diagnostics.Activity AddTag(string key, string? value) { throw null; }
public string? GetBaggageItem(string key) { throw null; }
public System.Diagnostics.Activity SetEndTime(System.DateTime endTimeUtc) { throw null; }
Expand All @@ -55,6 +63,10 @@ public string? Id
public System.Diagnostics.Activity SetStartTime(System.DateTime startTimeUtc) { throw null; }
public System.Diagnostics.Activity Start() { throw null; }
public void Stop() { }
public void Dispose() { }
public void SetCustomProperty(string propertyName, object? propertyValue) { }
public object? GetCustomProperty(string propertyName) { throw null; }
public ActivityContext Context { get { throw null; } }
}
public enum ActivityIdFormat
{
Expand Down Expand Up @@ -82,6 +94,23 @@ public void CopyTo(System.Span<byte> destination) { }
public string ToHexString() { throw null; }
public override string ToString() { throw null; }
}
public sealed class ActivitySource : IDisposable
{
public ActivitySource(string name, string version = "") { throw null; }
public string Name { get { throw null; } }
public string Version { get { throw null; } }
public bool HasListeners() { throw null; }
public System.Diagnostics.Activity? StartActivity(string name, System.Diagnostics.ActivityKind kind = ActivityKind.Internal) { throw null; }
public System.Diagnostics.Activity? StartActivity(string name, System.Diagnostics.ActivityKind kind, System.Diagnostics.ActivityContext parentContext, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>>? tags = null, System.Collections.Generic.IEnumerable<System.Diagnostics.ActivityLink>? links = null, System.DateTimeOffset startTime = default) { throw null; }
public System.Diagnostics.Activity? StartActivity(string name, System.Diagnostics.ActivityKind kind, string parentId, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>>? tags = null, System.Collections.Generic.IEnumerable<System.Diagnostics.ActivityLink>? links = null, System.DateTimeOffset startTime = default) { throw null; }
public void Dispose() { throw null; }
public static IDisposable AddActivityListener(
System.Func<System.Diagnostics.ActivitySource, bool> listenToSource,
System.Func<System.Diagnostics.ActivitySource, string, System.Diagnostics.ActivityKind, System.Diagnostics.ActivityContext, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>>?, System.Collections.Generic.IEnumerable<System.Diagnostics.ActivityLink>?, System.Diagnostics.ActivityDataRequest> getActivityDataRequestUsingContext,
System.Func<System.Diagnostics.ActivitySource, string, System.Diagnostics.ActivityKind, string, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>>?, System.Collections.Generic.IEnumerable<System.Diagnostics.ActivityLink>?, System.Diagnostics.ActivityDataRequest> getActivityDataRequestUsingParentId,
System.Action<System.Diagnostics.Activity> onActivityStarted,
System.Action<System.Diagnostics.Activity> onActivityStopped) { throw null; }
}
[System.FlagsAttribute]
public enum ActivityTraceFlags
{
Expand Down Expand Up @@ -121,4 +150,56 @@ public virtual void OnActivityImport(System.Diagnostics.Activity activity, objec
public System.Diagnostics.Activity StartActivity(System.Diagnostics.Activity activity, object? args) { throw null; }
public void StopActivity(System.Diagnostics.Activity activity, object? args) { }
}
public enum ActivityDataRequest
{
None,
PropagationData,
AllData,
AllDataAndRecorded
}
public enum ActivityKind
{
Internal = 1,
Server = 2,
Client = 3,
Producer = 4,
Consumer = 5,
}
public sealed class ActivityEvent
{
public ActivityEvent(string name) {throw null; }
public ActivityEvent(string name, System.DateTimeOffset timestamp) { throw null; }
public ActivityEvent(string name, System.DateTimeOffset timestamp, System.Collections.Generic.IReadOnlyDictionary<string, object> attributes) { throw null; }
public ActivityEvent(string name, System.Collections.Generic.IReadOnlyDictionary<string, object> attributes) { throw null; }
public string Name { get { throw null; } }
public System.DateTimeOffset Timestamp { get { throw null; } }
public System.Collections.Generic.IReadOnlyDictionary<string, object> Attributes { get { throw null; } }
}
public readonly struct ActivityContext : System.IEquatable<System.Diagnostics.ActivityContext>
{
public ActivityContext(System.Diagnostics.ActivityTraceId traceId, System.Diagnostics.ActivitySpanId spanId, System.Diagnostics.ActivityTraceFlags traceOptions, string? traceState = null) { throw null; }
public System.Diagnostics.ActivityTraceId TraceId { get; }
public System.Diagnostics.ActivitySpanId SpanId { get; }
public System.Diagnostics.ActivityTraceFlags TraceFlags { get; }
public string? TraceState { get; }
public static bool operator ==(System.Diagnostics.ActivityContext context1, System.Diagnostics.ActivityContext context2) { throw null; }
public static bool operator !=(System.Diagnostics.ActivityContext context1, System.Diagnostics.ActivityContext context2) { throw null; }
public bool Equals(System.Diagnostics.ActivityContext context) { throw null; }
public override bool Equals(object? obj) { throw null; }
public override int GetHashCode() { throw null; }
}
public readonly struct ActivityLink : IEquatable<ActivityLink>
{
public ActivityLink(System.Diagnostics.ActivityContext context) { throw null; }
public ActivityLink(System.Diagnostics.ActivityContext context, System.Collections.Generic.IReadOnlyDictionary<string, object>? attributes) { throw null; }
public System.Diagnostics.ActivityContext Context { get; }
public System.Collections.Generic.IReadOnlyDictionary<string, object>? Attributes { get; }

public override bool Equals(object? obj) { throw null; }
public bool Equals(System.Diagnostics.ActivityLink link) { throw null; }
public static bool operator ==(System.Diagnostics.ActivityLink link1, System.Diagnostics.ActivityLink link2) { throw null; }
public static bool operator !=(System.Diagnostics.ActivityLink link1, System.Diagnostics.ActivityLink link2) { throw null; }
public override int GetHashCode() { throw null; }
}
}

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema

Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes

The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.

Example:

... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
Expand All @@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple

There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the

Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not

The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can

Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.

mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
Expand Down Expand Up @@ -144,9 +144,15 @@
<data name="SetFormatOnStartedActivity" xml:space="preserve">
<value>"Can not change format for an activity that was already started"</value>
</data>
<data name="SetLinkInvalid" xml:space="preserve">
<value>"Can not add link to activity after it has been started"</value>
</data>
<data name="SetParentIdOnActivityWithParent" xml:space="preserve">
<value>"Can not set ParentId on activity which has parent"</value>
</data>
<data name="SpanIdOrTraceIdInvalid" xml:space="preserve">
<value>"Invalid SpanId or TraceId"</value>
</data>
<data name="StartTimeNotUtc" xml:space="preserve">
<value>"StartTime is not UTC"</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
<Link>Common\System\HexConverter.cs</Link>
</Compile>
<Compile Include="System\Diagnostics\Activity.cs" />
<Compile Include="System\Diagnostics\ActivityContext.cs" />
<Compile Include="System\Diagnostics\ActivityDataRequest.cs" />
<Compile Include="System\Diagnostics\ActivityEvent.cs" />
<Compile Include="System\Diagnostics\ActivityKind.cs" />
<Compile Include="System\Diagnostics\ActivityLink.cs" />
<Compile Include="System\Diagnostics\ActivityListener.cs" />
<Compile Include="System\Diagnostics\ActivitySource.cs" />
<Compile Include="System\Diagnostics\DiagnosticSourceActivity.cs" />
<Reference Include="System.Memory" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
Expand Down
Loading