UNPKG

@tsonic/dotnet-pure

Version:

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

228 lines (191 loc) 10.9 kB
// Generated by tsbindgen - Architecture // Namespace: System.IO.IsolatedStorage // Assembly: System.IO.IsolatedStorage // 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 { SafeFileHandle } from "../../Microsoft.Win32.SafeHandles/internal/index.js"; import type { IDictionary, IEnumerator } from "../../System.Collections/internal/index.js"; import * as System_IO_Internal from "../../System.IO/internal/index.js"; import type { FileAccess, FileMode, FileShare, FileStream, SeekOrigin, Stream } from "../../System.IO/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 type { Task, Task_1, ValueTask, ValueTask_1 } from "../../System.Threading.Tasks/internal/index.js"; import type { CancellationToken } from "../../System.Threading/internal/index.js"; import * as System_Internal from "../../System/internal/index.js"; import type { AsyncCallback, Boolean as ClrBoolean, Byte, DateTimeOffset, Enum, Exception, IAsyncDisposable, IAsyncResult, IComparable, IConvertible, IDisposable, IFormatProvider, IFormattable, Int32, Int64, IntPtr, ISpanFormattable, MarshalByRefObject, Memory_1, Object as ClrObject, ReadOnlyMemory_1, ReadOnlySpan_1, Span_1, String as ClrString, Type, TypeCode, UInt64, 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 IsolatedStorageScope { None = 0, User = 1, Domain = 2, Assembly = 4, Roaming = 8, Machine = 16, Application = 32 } export interface INormalizeForIsolatedStorage$instance { Normalize(): unknown; } export type INormalizeForIsolatedStorage = INormalizeForIsolatedStorage$instance; export interface IsolatedStorage$instance extends MarshalByRefObject { readonly ApplicationIdentity: unknown; readonly AssemblyIdentity: unknown; readonly AvailableFreeSpace: long; readonly CurrentSize: ulong; readonly DomainIdentity: unknown; readonly MaximumSize: ulong; readonly Quota: long; readonly Scope: IsolatedStorageScope; readonly UsedSize: long; IncreaseQuotaTo(newQuotaSize: long): boolean; Remove(): void; } export const IsolatedStorage: { }; export type IsolatedStorage = IsolatedStorage$instance; export interface IsolatedStorageException$instance extends Exception { GetObjectData(info: SerializationInfo, context: StreamingContext): void; } export const IsolatedStorageException: { new(): IsolatedStorageException$instance; new(message: string): IsolatedStorageException$instance; new(message: string, inner: Exception): IsolatedStorageException$instance; }; export interface __IsolatedStorageException$views { As_ISerializable(): System_Runtime_Serialization_Internal.ISerializable$instance; } export type IsolatedStorageException = IsolatedStorageException$instance & __IsolatedStorageException$views; export interface IsolatedStorageFile$instance extends IsolatedStorage { readonly AvailableFreeSpace: long; readonly CurrentSize: ulong; readonly MaximumSize: ulong; readonly Quota: long; readonly UsedSize: long; Close(): void; CopyFile(sourceFileName: string, destinationFileName: string): void; CopyFile(sourceFileName: string, destinationFileName: string, overwrite: boolean): void; CreateDirectory(dir: string): void; CreateFile(path: string): IsolatedStorageFileStream; DeleteDirectory(dir: string): void; DeleteFile(file: string): void; DirectoryExists(path: string): boolean; Dispose(): void; FileExists(path: string): boolean; GetCreationTime(path: string): DateTimeOffset; GetDirectoryNames(): string[]; GetDirectoryNames(searchPattern: string): string[]; GetFileNames(): string[]; GetFileNames(searchPattern: string): string[]; GetLastAccessTime(path: string): DateTimeOffset; GetLastWriteTime(path: string): DateTimeOffset; IncreaseQuotaTo(newQuotaSize: long): boolean; MoveDirectory(sourceDirectoryName: string, destinationDirectoryName: string): void; MoveFile(sourceFileName: string, destinationFileName: string): void; OpenFile(path: string, mode: FileMode): IsolatedStorageFileStream; OpenFile(path: string, mode: FileMode, access: FileAccess): IsolatedStorageFileStream; OpenFile(path: string, mode: FileMode, access: FileAccess, share: FileShare): IsolatedStorageFileStream; Remove(): void; } export const IsolatedStorageFile: { new(): IsolatedStorageFile$instance; readonly IsEnabled: boolean; GetEnumerator(scope: IsolatedStorageScope): IEnumerator; GetMachineStoreForApplication(): IsolatedStorageFile; GetMachineStoreForAssembly(): IsolatedStorageFile; GetMachineStoreForDomain(): IsolatedStorageFile; GetStore(scope: IsolatedStorageScope, domainIdentity: unknown, assemblyIdentity: unknown): IsolatedStorageFile; GetStore(scope: IsolatedStorageScope, applicationIdentity: unknown): IsolatedStorageFile; GetStore(scope: IsolatedStorageScope, domainEvidenceType: Type, assemblyEvidenceType: Type): IsolatedStorageFile; GetStore(scope: IsolatedStorageScope, applicationEvidenceType: Type): IsolatedStorageFile; GetUserStoreForApplication(): IsolatedStorageFile; GetUserStoreForAssembly(): IsolatedStorageFile; GetUserStoreForDomain(): IsolatedStorageFile; GetUserStoreForSite(): IsolatedStorageFile; Remove(scope: IsolatedStorageScope): void; }; export interface __IsolatedStorageFile$views { As_IDisposable(): System_Internal.IDisposable$instance; } export interface IsolatedStorageFile$instance extends System_Internal.IDisposable$instance {} export type IsolatedStorageFile = IsolatedStorageFile$instance & __IsolatedStorageFile$views; export interface IsolatedStorageFileStream$instance extends FileStream { readonly CanRead: boolean; readonly CanSeek: boolean; readonly CanWrite: boolean; readonly Handle: nint; readonly IsAsync: boolean; readonly Length: long; Position: long; readonly SafeFileHandle: SafeFileHandle; BeginRead(array: byte[], offset: int, numBytes: int, userCallback: AsyncCallback, stateObject: unknown): IAsyncResult; BeginWrite(array: byte[], offset: int, numBytes: int, userCallback: AsyncCallback, stateObject: unknown): IAsyncResult; Dispose(): void; DisposeAsync(): ValueTask; EndRead(asyncResult: IAsyncResult): int; EndWrite(asyncResult: IAsyncResult): void; Flush(): void; Flush(flushToDisk: boolean): void; FlushAsync(cancellationToken: CancellationToken): Task; FlushAsync(): Task; Lock(position: long, length: long): void; Read(buffer: byte[], offset: int, count: int): int; Read(buffer: Span_1<CLROf<byte>>): int; Read(buffer: Span_1<CLROf<byte>>): int; ReadAsync(buffer: byte[], offset: int, count: int, cancellationToken: CancellationToken): Task_1<CLROf<int>>; ReadAsync(buffer: Memory_1<CLROf<byte>>, cancellationToken: CancellationToken): ValueTask_1<CLROf<int>>; ReadAsync(buffer: byte[], offset: int, count: int, cancellationToken: CancellationToken): Task_1<CLROf<int>>; ReadAsync(buffer: Memory_1<CLROf<byte>>, cancellationToken?: CancellationToken): ValueTask_1<CLROf<int>>; ReadAsync(buffer: byte[], offset: int, count: int): Task_1<CLROf<int>>; ReadByte(): int; Seek(offset: long, origin: SeekOrigin): long; SetLength(value: long): void; Unlock(position: long, length: long): void; Write(buffer: byte[], offset: int, count: int): void; Write(buffer: ReadOnlySpan_1<CLROf<byte>>): void; Write(buffer: ReadOnlySpan_1<CLROf<byte>>): void; WriteAsync(buffer: byte[], offset: int, count: int, cancellationToken: CancellationToken): Task; WriteAsync(buffer: ReadOnlyMemory_1<CLROf<byte>>, cancellationToken: CancellationToken): ValueTask; WriteAsync(buffer: ReadOnlyMemory_1<CLROf<byte>>, cancellationToken?: CancellationToken): ValueTask; WriteAsync(buffer: byte[], offset: int, count: int): Task; WriteByte(value: byte): void; } export const IsolatedStorageFileStream: { new(path: string, mode: FileMode): IsolatedStorageFileStream$instance; new(path: string, mode: FileMode, isf: IsolatedStorageFile): IsolatedStorageFileStream$instance; new(path: string, mode: FileMode, access: FileAccess): IsolatedStorageFileStream$instance; new(path: string, mode: FileMode, access: FileAccess, isf: IsolatedStorageFile): IsolatedStorageFileStream$instance; new(path: string, mode: FileMode, access: FileAccess, share: FileShare): IsolatedStorageFileStream$instance; new(path: string, mode: FileMode, access: FileAccess, share: FileShare, isf: IsolatedStorageFile): IsolatedStorageFileStream$instance; new(path: string, mode: FileMode, access: FileAccess, share: FileShare, bufferSize: int): IsolatedStorageFileStream$instance; new(path: string, mode: FileMode, access: FileAccess, share: FileShare, bufferSize: int, isf: IsolatedStorageFile): IsolatedStorageFileStream$instance; }; export interface __IsolatedStorageFileStream$views { As_IAsyncDisposable(): System_Internal.IAsyncDisposable$instance; As_IDisposable(): System_Internal.IDisposable$instance; } export type IsolatedStorageFileStream = IsolatedStorageFileStream$instance & __IsolatedStorageFileStream$views;