UNPKG

@tsonic/dotnet

Version:

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

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;