UNPKG

@tsonic/dotnet-pure

Version:

TypeScript type definitions for .NET 10 BCL (Base Class Library) - CLR naming

503 lines (359 loc) 14.4 kB
// Generated by tsbindgen - Architecture // Namespace: System.Diagnostics.Tracing // Assembly: System.Private.CoreLib // Branded primitive types are sourced from @tsonic/types import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/types'; // Import support types from @tsonic/types import type { ptr, ref } from "@tsonic/types"; // Import types from other namespaces import type { IDictionary_2, IEnumerable_1 } from "../../System.Collections.Generic/internal/index.js"; import type { ReadOnlyCollection_1 } from "../../System.Collections.ObjectModel/internal/index.js"; import type { IDictionary } from "../../System.Collections/internal/index.js"; import type { MethodBase } from "../../System.Reflection/internal/index.js"; import * as System_Runtime_Serialization_Internal from "../../System.Runtime.Serialization/internal/index.js"; import type { ISerializable, SerializationInfo, StreamingContext } from "../../System.Runtime.Serialization/internal/index.js"; import * as System_Internal from "../../System/internal/index.js"; import type { Attribute, Boolean as ClrBoolean, Byte, DateTime, Double, Enum, EventArgs, EventHandler_1, Exception, Func_1, Guid, IComparable, IConvertible, IDisposable, IFormatProvider, IFormattable, Int32, Int64, ISpanFormattable, Object as ClrObject, Single, String as ClrString, TimeSpan, Type, TypeCode, ValueType, Void } from "../../System/internal/index.js"; // CLROf<T> - Maps ergonomic primitives to their CLR types for generic constraints // This utility is used ONLY in generic type arguments to satisfy CLR interface constraints // Value positions (parameters, return types) use lowercase primitives for ergonomics export type CLROf<T> = T extends sbyte ? System_Internal.SByte : T extends short ? System_Internal.Int16 : T extends int ? System_Internal.Int32 : T extends long ? System_Internal.Int64 : T extends int128 ? System_Internal.Int128 : T extends nint ? System_Internal.IntPtr : T extends byte ? System_Internal.Byte : T extends ushort ? System_Internal.UInt16 : T extends uint ? System_Internal.UInt32 : T extends ulong ? System_Internal.UInt64 : T extends uint128 ? System_Internal.UInt128 : T extends nuint ? System_Internal.UIntPtr : T extends half ? System_Internal.Half : T extends float ? System_Internal.Single : T extends double ? System_Internal.Double : T extends decimal ? System_Internal.Decimal : T extends char ? System_Internal.Char : T extends boolean ? System_Internal.Boolean : T extends string ? System_Internal.String : T; // Identity fallback for non-primitive types export enum EventActivityOptions { None = 0, Disable = 2, Recursive = 4, Detachable = 8 } export enum EventChannel { None = 0, Admin = 16, Operational = 17, Analytic = 18, Debug = 19 } export enum EventCommand { Update = 0, SendManifest = -1, Enable = -2, Disable = -3 } export enum EventFieldFormat { Default = 0, String = 2, Boolean = 3, Hexadecimal = 4, Xml = 11, Json = 12, HResult = 15 } export enum EventFieldTags { None = 0 } export enum EventKeywords { None = 0, All = -1, MicrosoftTelemetry = 562949953421312, WdiContext = 562949953421312, WdiDiagnostic = 1125899906842624, Sqm = 2251799813685248, AuditFailure = 4503599627370496, AuditSuccess = 9007199254740992, CorrelationHint = 4503599627370496, EventLogClassic = 36028797018963968 } export enum EventLevel { LogAlways = 0, Critical = 1, Error = 2, Warning = 3, Informational = 4, Verbose = 5 } export enum EventManifestOptions { None = 0, Strict = 1, AllCultures = 2, OnlyIfNeededForRegistration = 4, AllowEventSourceOverride = 8 } export enum EventOpcode { Info = 0, Start = 1, Stop = 2, DataCollectionStart = 3, DataCollectionStop = 4, Extension = 5, Reply = 6, Resume = 7, Suspend = 8, Send = 9, Receive = 240 } export enum EventSourceSettings { Default = 0, ThrowOnEventWriteErrors = 1, EtwManifestEventFormat = 4, EtwSelfDescribingEventFormat = 8 } export enum EventTags { None = 0 } export enum EventTask { None = 0 } export interface EventSource_EventSourcePrimitive$instance { } export const EventSource_EventSourcePrimitive: { new(): EventSource_EventSourcePrimitive$instance; }; export type EventSource_EventSourcePrimitive = EventSource_EventSourcePrimitive$instance; export interface EventSourceOptions$instance { ActivityOptions: EventActivityOptions; Keywords: EventKeywords; Level: EventLevel; Opcode: EventOpcode; Tags: EventTags; } export const EventSourceOptions: { new(): EventSourceOptions$instance; }; export type EventSourceOptions = EventSourceOptions$instance; export interface DiagnosticCounter$instance { DisplayName: string; DisplayUnits: string; readonly EventSource: EventSource; readonly Name: string; AddMetadata(key: string, value: string): void; Dispose(): void; } export const DiagnosticCounter: { }; export interface __DiagnosticCounter$views { As_IDisposable(): System_Internal.IDisposable$instance; } export interface DiagnosticCounter$instance extends System_Internal.IDisposable$instance {} export type DiagnosticCounter = DiagnosticCounter$instance & __DiagnosticCounter$views; export interface EventAttribute$instance extends Attribute { ActivityOptions: EventActivityOptions; Channel: EventChannel; readonly EventId: int; Keywords: EventKeywords; Level: EventLevel; Message: string; Opcode: EventOpcode; Tags: EventTags; Task: EventTask; Version: byte; } export const EventAttribute: { new(eventId: int): EventAttribute$instance; }; export type EventAttribute = EventAttribute$instance; export interface EventCommandEventArgs$instance extends EventArgs { readonly Arguments: IDictionary_2<CLROf<string>, CLROf<string>>; readonly Command: EventCommand; DisableEvent(eventId: int): boolean; EnableEvent(eventId: int): boolean; } export const EventCommandEventArgs: { new(): EventCommandEventArgs$instance; }; export type EventCommandEventArgs = EventCommandEventArgs$instance; export interface EventCounter$instance extends DiagnosticCounter$instance { Dispose(): void; ToString(): string; WriteMetric(value: float): void; WriteMetric(value: double): void; } export const EventCounter: { new(name: string, eventSource: EventSource): EventCounter$instance; }; export interface __EventCounter$views { As_IDisposable(): System_Internal.IDisposable$instance; } export type EventCounter = EventCounter$instance & __EventCounter$views; export interface EventDataAttribute$instance extends Attribute { Name: string; } export const EventDataAttribute: { new(): EventDataAttribute$instance; }; export type EventDataAttribute = EventDataAttribute$instance; export interface EventFieldAttribute$instance extends Attribute { Format: EventFieldFormat; Tags: EventFieldTags; } export const EventFieldAttribute: { new(): EventFieldAttribute$instance; }; export type EventFieldAttribute = EventFieldAttribute$instance; export interface EventIgnoreAttribute$instance extends Attribute { } export const EventIgnoreAttribute: { new(): EventIgnoreAttribute$instance; }; export type EventIgnoreAttribute = EventIgnoreAttribute$instance; export interface EventListener$instance { DisableEvents(eventSource: EventSource): void; Dispose(): void; EnableEvents(eventSource: EventSource, level: EventLevel): void; EnableEvents(eventSource: EventSource, level: EventLevel, matchAnyKeyword: EventKeywords): void; EnableEvents(eventSource: EventSource, level: EventLevel, matchAnyKeyword: EventKeywords, arguments: IDictionary_2<CLROf<string>, CLROf<string>>): void; } export const EventListener: { }; export interface __EventListener$views { As_IDisposable(): System_Internal.IDisposable$instance; } export interface EventListener$instance extends System_Internal.IDisposable$instance {} export type EventListener = EventListener$instance & __EventListener$views; export interface EventSource$instance { readonly ConstructionException: Exception; readonly Guid: Guid; readonly Name: string; readonly Settings: EventSourceSettings; Dispose(): void; GetTrait(key: string): string; IsEnabled(): boolean; IsEnabled(level: EventLevel, keywords: EventKeywords): boolean; IsEnabled(level: EventLevel, keywords: EventKeywords, channel: EventChannel): boolean; ToString(): string; Write(eventName: string): void; Write(eventName: string, options: EventSourceOptions): void; Write<T>(eventName: string, data: T): void; Write<T>(eventName: string, options: EventSourceOptions, data: T): void; Write<T>(eventName: string, options: { value: ref<EventSourceOptions> }, data: { value: ref<T> }): void; Write<T>(eventName: string, options: { value: ref<EventSourceOptions> }, activityId: { value: ref<Guid> }, relatedActivityId: { value: ref<Guid> }, data: { value: ref<T> }): void; } export const EventSource: { new(eventSourceName: string): EventSource$instance; new(eventSourceName: string, config: EventSourceSettings): EventSource$instance; new(eventSourceName: string, config: EventSourceSettings, traits: string[]): EventSource$instance; readonly CurrentThreadActivityId: Guid; GenerateManifest(eventSourceType: Type, assemblyPathToIncludeInManifest: string, flags: EventManifestOptions): string; GenerateManifest(eventSourceType: Type, assemblyPathToIncludeInManifest: string): string; GetGuid(eventSourceType: Type): Guid; GetName(eventSourceType: Type): string; GetSources(): IEnumerable_1<EventSource>; SendCommand(eventSource: EventSource, command: EventCommand, commandArguments: IDictionary_2<CLROf<string>, CLROf<string>>): void; SetCurrentThreadActivityId(activityId: Guid, oldActivityThatWillContinue: { value: ref<Guid> }): void; SetCurrentThreadActivityId(activityId: Guid): void; }; export interface __EventSource$views { As_IDisposable(): System_Internal.IDisposable$instance; } export interface EventSource$instance extends System_Internal.IDisposable$instance {} export type EventSource = EventSource$instance & __EventSource$views; export interface EventSourceAttribute$instance extends Attribute { Guid: string; LocalizationResources: string; Name: string; } export const EventSourceAttribute: { new(): EventSourceAttribute$instance; }; export type EventSourceAttribute = EventSourceAttribute$instance; export interface EventSourceCreatedEventArgs$instance extends EventArgs { readonly EventSource: EventSource; } export const EventSourceCreatedEventArgs: { new(): EventSourceCreatedEventArgs$instance; }; export type EventSourceCreatedEventArgs = EventSourceCreatedEventArgs$instance; export interface EventSourceException$instance extends Exception { GetObjectData(info: SerializationInfo, context: StreamingContext): void; } export const EventSourceException: { new(): EventSourceException$instance; new(message: string): EventSourceException$instance; new(message: string, innerException: Exception): EventSourceException$instance; }; export interface __EventSourceException$views { As_ISerializable(): System_Runtime_Serialization_Internal.ISerializable$instance; } export type EventSourceException = EventSourceException$instance & __EventSourceException$views; export interface EventWrittenEventArgs$instance extends EventArgs { readonly ActivityId: Guid; readonly Channel: EventChannel; readonly EventId: int; readonly EventName: string; readonly EventSource: EventSource; readonly Keywords: EventKeywords; readonly Level: EventLevel; readonly Message: string; readonly Opcode: EventOpcode; readonly OSThreadId: long; readonly Payload: ReadOnlyCollection_1<unknown>; readonly PayloadNames: ReadOnlyCollection_1<CLROf<string>>; readonly RelatedActivityId: Guid; readonly Tags: EventTags; readonly Task: EventTask; readonly TimeStamp: DateTime; readonly Version: byte; } export const EventWrittenEventArgs: { new(): EventWrittenEventArgs$instance; }; export type EventWrittenEventArgs = EventWrittenEventArgs$instance; export interface IncrementingEventCounter$instance extends DiagnosticCounter$instance { DisplayRateTimeScale: TimeSpan; Dispose(): void; Increment(increment?: double): void; ToString(): string; } export const IncrementingEventCounter: { new(name: string, eventSource: EventSource): IncrementingEventCounter$instance; }; export interface __IncrementingEventCounter$views { As_IDisposable(): System_Internal.IDisposable$instance; } export type IncrementingEventCounter = IncrementingEventCounter$instance & __IncrementingEventCounter$views; export interface IncrementingPollingCounter$instance extends DiagnosticCounter$instance { DisplayRateTimeScale: TimeSpan; Dispose(): void; ToString(): string; } export const IncrementingPollingCounter: { new(name: string, eventSource: EventSource, totalValueProvider: Func_1<CLROf<double>>): IncrementingPollingCounter$instance; }; export interface __IncrementingPollingCounter$views { As_IDisposable(): System_Internal.IDisposable$instance; } export type IncrementingPollingCounter = IncrementingPollingCounter$instance & __IncrementingPollingCounter$views; export interface NonEventAttribute$instance extends Attribute { } export const NonEventAttribute: { new(): NonEventAttribute$instance; }; export type NonEventAttribute = NonEventAttribute$instance; export interface PollingCounter$instance extends DiagnosticCounter$instance { Dispose(): void; ToString(): string; } export const PollingCounter: { new(name: string, eventSource: EventSource, metricProvider: Func_1<CLROf<double>>): PollingCounter$instance; }; export interface __PollingCounter$views { As_IDisposable(): System_Internal.IDisposable$instance; } export type PollingCounter = PollingCounter$instance & __PollingCounter$views;