// Generated by tsbindgen - Architecture // Namespace: Microsoft.Extensions.Caching.Distributed // Assembly: Microsoft.Extensions.Caching.Abstractions, Microsoft.Extensions.Caching.Memory // Core type aliases from @tsonic/core import type { fnptr, ptr, sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/core/types.js'; // Import types from other namespaces import type { MemoryDistributedCacheOptions } from "../../Microsoft.Extensions.Caching.Memory/internal/index.js"; import type { ILoggerFactory } from "../../Microsoft.Extensions.Logging/internal/index.js"; import type { IOptions_1 } from "../../Microsoft.Extensions.Options/internal/index.js"; import type { IBufferWriter_1, ReadOnlySequence_1 } from "@tsonic/dotnet/System.Buffers/internal/index.js"; import type { Task, Task_1, ValueTask, ValueTask_1 } from "@tsonic/dotnet/System.Threading.Tasks/internal/index.js"; import type { CancellationToken } from "@tsonic/dotnet/System.Threading/internal/index.js"; import * as System_Internal from "@tsonic/dotnet/System/internal/index.js"; import type { Boolean as ClrBoolean, Byte, DateTimeOffset, Nullable_1, Object as ClrObject, String as ClrString, TimeSpan, Void } from "@tsonic/dotnet/System/internal/index.js"; export interface IBufferDistributedCache$instance extends IDistributedCache { readonly __tsonic_iface_Microsoft_Extensions_Caching_Distributed_IBufferDistributedCache: never; Get(key: string): byte[] | null; GetAsync(key: string, token?: CancellationToken): Task_1; Refresh(key: string): void; RefreshAsync(key: string, token?: CancellationToken): Task; Set(key: string, value: ReadOnlySequence_1, options: DistributedCacheEntryOptions): void; Set(key: string, value: byte[], options: DistributedCacheEntryOptions): void; SetAsync(key: string, value: ReadOnlySequence_1, options: DistributedCacheEntryOptions, token?: CancellationToken): ValueTask; SetAsync(key: string, value: byte[], options: DistributedCacheEntryOptions, token?: CancellationToken): Task; TryGet(key: string, destination: IBufferWriter_1): boolean; TryGetAsync(key: string, destination: IBufferWriter_1, token?: CancellationToken): ValueTask_1; } export type IBufferDistributedCache = IBufferDistributedCache$instance; export interface IDistributedCache$instance { readonly __tsonic_iface_Microsoft_Extensions_Caching_Distributed_IDistributedCache: never; Get(key: string): byte[] | null; GetAsync(key: string, token?: CancellationToken): Task_1; Refresh(key: string): void; RefreshAsync(key: string, token?: CancellationToken): Task; Set(key: string, value: byte[], options: DistributedCacheEntryOptions): void; SetAsync(key: string, value: byte[], options: DistributedCacheEntryOptions, token?: CancellationToken): Task; } export type IDistributedCache = IDistributedCache$instance; export interface DistributedCacheEntryOptions$instance { readonly __tsonic_type_Microsoft_Extensions_Caching_Distributed_DistributedCacheEntryOptions: never; get AbsoluteExpiration(): Nullable_1; set AbsoluteExpiration(value: Nullable_1 | DateTimeOffset); get AbsoluteExpirationRelativeToNow(): Nullable_1; set AbsoluteExpirationRelativeToNow(value: Nullable_1 | TimeSpan); get SlidingExpiration(): Nullable_1; set SlidingExpiration(value: Nullable_1 | TimeSpan); } export const DistributedCacheEntryOptions: { new(): DistributedCacheEntryOptions; }; export type DistributedCacheEntryOptions = DistributedCacheEntryOptions$instance; export interface MemoryDistributedCache$instance extends IDistributedCache$instance { readonly __tsonic_type_Microsoft_Extensions_Caching_Distributed_MemoryDistributedCache: never; readonly __tsonic_iface_Microsoft_Extensions_Caching_Distributed_IDistributedCache: never; Get(key: string): byte[] | null; GetAsync(key: string, token?: CancellationToken): Task_1; Refresh(key: string): void; RefreshAsync(key: string, token?: CancellationToken): Task; Remove(key: string): void; RemoveAsync(key: string, token?: CancellationToken): Task; Set(key: string, value: byte[], options: DistributedCacheEntryOptions): void; SetAsync(key: string, value: byte[], options: DistributedCacheEntryOptions, token?: CancellationToken): Task; } export const MemoryDistributedCache: { new(optionsAccessor: IOptions_1): MemoryDistributedCache; new(optionsAccessor: IOptions_1, loggerFactory: ILoggerFactory): MemoryDistributedCache; }; export interface __MemoryDistributedCache$views { As_IDistributedCache(): IDistributedCache$instance; } export type MemoryDistributedCache = MemoryDistributedCache$instance & __MemoryDistributedCache$views; export abstract class DistributedCacheEntryExtensions$instance { static SetAbsoluteExpiration(options: DistributedCacheEntryOptions, absolute: DateTimeOffset): DistributedCacheEntryOptions; static SetAbsoluteExpiration(options: DistributedCacheEntryOptions, relative: TimeSpan): DistributedCacheEntryOptions; static SetSlidingExpiration(options: DistributedCacheEntryOptions, offset: TimeSpan): DistributedCacheEntryOptions; } export type DistributedCacheEntryExtensions = DistributedCacheEntryExtensions$instance; export abstract class DistributedCacheExtensions$instance { static GetString(cache: IDistributedCache, key: string): string | null; static GetStringAsync(cache: IDistributedCache, key: string, token?: CancellationToken): Task_1; static Set(cache: IDistributedCache, key: string, value: byte[]): void; static SetAsync(cache: IDistributedCache, key: string, value: byte[], token?: CancellationToken): Task; static SetString(cache: IDistributedCache, key: string, value: string, options: DistributedCacheEntryOptions): void; static SetString(cache: IDistributedCache, key: string, value: string): void; static SetStringAsync(cache: IDistributedCache, key: string, value: string, options: DistributedCacheEntryOptions, token?: CancellationToken): Task; static SetStringAsync(cache: IDistributedCache, key: string, value: string, token?: CancellationToken): Task; } export type DistributedCacheExtensions = DistributedCacheExtensions$instance;