UNPKG

@tsonic/dotnet-pure

Version:

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

144 lines (117 loc) 7.91 kB
// Generated by tsbindgen - Architecture // Namespace: System.Runtime.Serialization.Json // Assembly: System.Private.DataContractSerialization // 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 types from other namespaces import type { IEnumerable_1 } from "../../System.Collections.Generic/internal/index.js"; import type { ReadOnlyCollection_1 } from "../../System.Collections.ObjectModel/internal/index.js"; import type { Stream } from "../../System.IO/internal/index.js"; import * as System_Runtime_Serialization_Internal from "../../System.Runtime.Serialization/internal/index.js"; import type { DateTimeFormat, EmitTypeInformation, ISerializationSurrogateProvider, XmlObjectSerializer } from "../../System.Runtime.Serialization/internal/index.js"; import type { Encoding } from "../../System.Text/internal/index.js"; import type { OnXmlDictionaryReaderClose, XmlDictionaryReader, XmlDictionaryReaderQuotas, XmlDictionaryString, XmlDictionaryWriter, XmlReader, XmlWriter } from "../../System.Xml/internal/index.js"; import * as System_Internal from "../../System/internal/index.js"; import type { Boolean as ClrBoolean, Byte, Int32, Object as ClrObject, String as ClrString, Type, 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 interface IXmlJsonReaderInitializer$instance { SetInput(buffer: byte[], offset: int, count: int, encoding: Encoding, quotas: XmlDictionaryReaderQuotas, onClose: OnXmlDictionaryReaderClose): void; SetInput(stream: Stream, encoding: Encoding, quotas: XmlDictionaryReaderQuotas, onClose: OnXmlDictionaryReaderClose): void; } export type IXmlJsonReaderInitializer = IXmlJsonReaderInitializer$instance; export interface IXmlJsonWriterInitializer$instance { SetOutput(stream: Stream, encoding: Encoding, ownsStream: boolean): void; } export type IXmlJsonWriterInitializer = IXmlJsonWriterInitializer$instance; export interface DataContractJsonSerializer$instance extends XmlObjectSerializer { readonly DateTimeFormat: DateTimeFormat; readonly EmitTypeInformation: EmitTypeInformation; readonly IgnoreExtensionDataObject: boolean; readonly KnownTypes: ReadOnlyCollection_1<Type>; readonly MaxItemsInObjectGraph: int; readonly SerializeReadOnlyTypes: boolean; readonly UseSimpleDictionaryFormat: boolean; GetSerializationSurrogateProvider(): ISerializationSurrogateProvider; IsStartObject(reader: XmlReader): boolean; IsStartObject(reader: XmlDictionaryReader): boolean; ReadObject(stream: Stream): unknown; ReadObject(reader: XmlReader): unknown; ReadObject(reader: XmlReader, verifyObjectName: boolean): unknown; ReadObject(reader: XmlDictionaryReader): unknown; ReadObject(reader: XmlDictionaryReader, verifyObjectName: boolean): unknown; SetSerializationSurrogateProvider(provider: ISerializationSurrogateProvider): void; WriteEndObject(writer: XmlWriter): void; WriteEndObject(writer: XmlDictionaryWriter): void; WriteObject(stream: Stream, graph: unknown): void; WriteObject(writer: XmlWriter, graph: unknown): void; WriteObject(writer: XmlDictionaryWriter, graph: unknown): void; WriteObjectContent(writer: XmlWriter, graph: unknown): void; WriteObjectContent(writer: XmlDictionaryWriter, graph: unknown): void; WriteStartObject(writer: XmlWriter, graph: unknown): void; WriteStartObject(writer: XmlDictionaryWriter, graph: unknown): void; } export const DataContractJsonSerializer: { new(type_: Type): DataContractJsonSerializer$instance; new(type_: Type, rootName: string): DataContractJsonSerializer$instance; new(type_: Type, rootName: XmlDictionaryString): DataContractJsonSerializer$instance; new(type_: Type, knownTypes: IEnumerable_1<Type>): DataContractJsonSerializer$instance; new(type_: Type, rootName: string, knownTypes: IEnumerable_1<Type>): DataContractJsonSerializer$instance; new(type_: Type, rootName: XmlDictionaryString, knownTypes: IEnumerable_1<Type>): DataContractJsonSerializer$instance; new(type_: Type, settings: DataContractJsonSerializerSettings): DataContractJsonSerializer$instance; }; export type DataContractJsonSerializer = DataContractJsonSerializer$instance; export interface DataContractJsonSerializerSettings$instance { DateTimeFormat: DateTimeFormat; EmitTypeInformation: EmitTypeInformation; IgnoreExtensionDataObject: boolean; KnownTypes: IEnumerable_1<Type>; MaxItemsInObjectGraph: int; RootName: string; SerializeReadOnlyTypes: boolean; UseSimpleDictionaryFormat: boolean; } export const DataContractJsonSerializerSettings: { new(): DataContractJsonSerializerSettings$instance; }; export type DataContractJsonSerializerSettings = DataContractJsonSerializerSettings$instance; export abstract class DataContractJsonSerializerExtensions$instance { static GetSerializationSurrogateProvider(serializer: DataContractJsonSerializer): ISerializationSurrogateProvider; static SetSerializationSurrogateProvider(serializer: DataContractJsonSerializer, provider: ISerializationSurrogateProvider): void; } export type DataContractJsonSerializerExtensions = DataContractJsonSerializerExtensions$instance; export abstract class JsonReaderWriterFactory$instance { static CreateJsonReader(buffer: byte[], offset: int, count: int, encoding: Encoding, quotas: XmlDictionaryReaderQuotas, onClose: OnXmlDictionaryReaderClose): XmlDictionaryReader; static CreateJsonReader(buffer: byte[], offset: int, count: int, quotas: XmlDictionaryReaderQuotas): XmlDictionaryReader; static CreateJsonReader(buffer: byte[], quotas: XmlDictionaryReaderQuotas): XmlDictionaryReader; static CreateJsonReader(stream: Stream, encoding: Encoding, quotas: XmlDictionaryReaderQuotas, onClose: OnXmlDictionaryReaderClose): XmlDictionaryReader; static CreateJsonReader(stream: Stream, quotas: XmlDictionaryReaderQuotas): XmlDictionaryReader; static CreateJsonWriter(stream: Stream, encoding: Encoding, ownsStream: boolean, indent: boolean, indentChars: string): XmlDictionaryWriter; static CreateJsonWriter(stream: Stream, encoding: Encoding, ownsStream: boolean, indent: boolean): XmlDictionaryWriter; static CreateJsonWriter(stream: Stream, encoding: Encoding, ownsStream: boolean): XmlDictionaryWriter; static CreateJsonWriter(stream: Stream, encoding: Encoding): XmlDictionaryWriter; static CreateJsonWriter(stream: Stream): XmlDictionaryWriter; } export type JsonReaderWriterFactory = JsonReaderWriterFactory$instance;