UNPKG

@tsonic/dotnet

Version:

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

160 lines (127 loc) 7.23 kB
// Generated by tsbindgen - Architecture // Namespace: System.IO.MemoryMappedFiles // Assembly: System.IO.MemoryMappedFiles // 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, SafeMemoryMappedFileHandle, SafeMemoryMappedViewHandle } from "../../Microsoft.Win32.SafeHandles/internal/index.js"; import * as System_IO_Internal from "../../System.IO/internal/index.js"; import type { FileMode, FileStream, HandleInheritability, SeekOrigin, Stream, UnmanagedMemoryAccessor, UnmanagedMemoryStream } from "../../System.IO/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, Char, Decimal, Double, Enum, IAsyncDisposable, IAsyncResult, IComparable, IConvertible, IDisposable, IFormatProvider, IFormattable, Int16, Int32, Int64, ISpanFormattable, Memory_1, Object as ClrObject, ReadOnlyMemory_1, ReadOnlySpan_1, SByte, Single, Span_1, String as ClrString, Type, TypeCode, UInt16, UInt32, 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 MemoryMappedFileAccess { readWrite = 0, read = 1, write = 2, copyOnWrite = 3, readExecute = 4, readWriteExecute = 5 } export enum MemoryMappedFileOptions { none = 0, delayAllocatePages = 67108864 } export enum MemoryMappedFileRights { copyOnWrite = 1, write = 2, read = 4, execute = 8, delete_ = 65536, readPermissions = 131072, changePermissions = 262144, takeOwnership = 524288, readWrite = 6, readExecute = 12, readWriteExecute = 14, fullControl = 983055, accessSystemSecurity = 16777216 } export interface MemoryMappedFile$instance { readonly safeMemoryMappedFileHandle: SafeMemoryMappedFileHandle; createViewAccessor(): MemoryMappedViewAccessor; createViewAccessor(offset: long, size: long): MemoryMappedViewAccessor; createViewAccessor(offset: long, size: long, access: MemoryMappedFileAccess): MemoryMappedViewAccessor; createViewStream(): MemoryMappedViewStream; createViewStream(offset: long, size: long): MemoryMappedViewStream; createViewStream(offset: long, size: long, access: MemoryMappedFileAccess): MemoryMappedViewStream; dispose(): void; } export const MemoryMappedFile: { new(): MemoryMappedFile$instance; createFromFile(fileHandle: SafeFileHandle, mapName: string, capacity: long, access: MemoryMappedFileAccess, inheritability: HandleInheritability, leaveOpen: boolean): MemoryMappedFile; createFromFile(fileStream: FileStream, mapName: string, capacity: long, access: MemoryMappedFileAccess, inheritability: HandleInheritability, leaveOpen: boolean): MemoryMappedFile; createFromFile(path: string, mode: FileMode, mapName: string, capacity: long, access: MemoryMappedFileAccess): MemoryMappedFile; createFromFile(path: string, mode: FileMode, mapName: string, capacity: long): MemoryMappedFile; createFromFile(path: string, mode: FileMode, mapName: string): MemoryMappedFile; createFromFile(path: string, mode: FileMode): MemoryMappedFile; createFromFile(path: string): MemoryMappedFile; createNew(mapName: string, capacity: long, access: MemoryMappedFileAccess, options: MemoryMappedFileOptions, inheritability: HandleInheritability): MemoryMappedFile; createNew(mapName: string, capacity: long, access: MemoryMappedFileAccess): MemoryMappedFile; createNew(mapName: string, capacity: long): MemoryMappedFile; createOrOpen(mapName: string, capacity: long, access: MemoryMappedFileAccess, options: MemoryMappedFileOptions, inheritability: HandleInheritability): MemoryMappedFile; createOrOpen(mapName: string, capacity: long, access: MemoryMappedFileAccess): MemoryMappedFile; createOrOpen(mapName: string, capacity: long): MemoryMappedFile; openExisting(mapName: string, desiredAccessRights: MemoryMappedFileRights, inheritability: HandleInheritability): MemoryMappedFile; openExisting(mapName: string, desiredAccessRights: MemoryMappedFileRights): MemoryMappedFile; openExisting(mapName: string): MemoryMappedFile; }; export interface __MemoryMappedFile$views { As_IDisposable(): System_Internal.IDisposable$instance; } export interface MemoryMappedFile$instance extends System_Internal.IDisposable$instance {} export type MemoryMappedFile = MemoryMappedFile$instance & __MemoryMappedFile$views; export interface MemoryMappedViewAccessor$instance extends UnmanagedMemoryAccessor { readonly pointerOffset: long; readonly safeMemoryMappedViewHandle: SafeMemoryMappedViewHandle; dispose(): void; flush(): void; } export const MemoryMappedViewAccessor: { new(): MemoryMappedViewAccessor$instance; }; export interface __MemoryMappedViewAccessor$views { As_IDisposable(): System_Internal.IDisposable$instance; } export type MemoryMappedViewAccessor = MemoryMappedViewAccessor$instance & __MemoryMappedViewAccessor$views; export interface MemoryMappedViewStream$instance extends UnmanagedMemoryStream { readonly pointerOffset: long; readonly safeMemoryMappedViewHandle: SafeMemoryMappedViewHandle; dispose(): void; disposeAsync(): ValueTask; flush(): void; setLength(value: long): void; } export const MemoryMappedViewStream: { new(): MemoryMappedViewStream$instance; }; export interface __MemoryMappedViewStream$views { As_IAsyncDisposable(): System_Internal.IAsyncDisposable$instance; As_IDisposable(): System_Internal.IDisposable$instance; } export type MemoryMappedViewStream = MemoryMappedViewStream$instance & __MemoryMappedViewStream$views;