UNPKG

@tsonic/dotnet

Version:

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

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;