@tsonic/dotnet
Version:
TypeScript type definitions for .NET 10 BCL (Base Class Library)
181 lines (143 loc) • 5.72 kB
TypeScript
// Generated by tsbindgen - Architecture
// Namespace: System.Net.Mime
// Assembly: System.Net.Mail
// 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 { StringDictionary } from "../../System.Collections.Specialized/internal/index.js";
import * as System_Internal from "../../System/internal/index.js";
import type { Boolean as ClrBoolean, DateTime, Enum, IComparable, IConvertible, IFormatProvider, IFormattable, Int32, Int64, ISpanFormattable, Object as ClrObject, String as ClrString, Type, TypeCode } 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 TransferEncoding {
unknown_ = -1,
quotedPrintable = 0,
base64 = 1,
sevenBit = 2,
eightBit = 3
}
export interface ContentDisposition$instance {
creationDate: DateTime;
dispositionType: string;
fileName: string;
inline: boolean;
modificationDate: DateTime;
readonly parameters: StringDictionary;
readDate: DateTime;
size: long;
equals(rparam: unknown): boolean;
getHashCode(): int;
toString(): string;
}
export const ContentDisposition: {
new(): ContentDisposition$instance;
new(disposition: string): ContentDisposition$instance;
};
export type ContentDisposition = ContentDisposition$instance;
export interface ContentType$instance {
boundary: string;
charSet: string;
mediaType: string;
name: string;
readonly parameters: StringDictionary;
equals(rparam: unknown): boolean;
getHashCode(): int;
toString(): string;
}
export const ContentType: {
new(): ContentType$instance;
new(contentType: string): ContentType$instance;
};
export type ContentType = ContentType$instance;
export abstract class DispositionTypeNames$instance {
static readonly inline: string;
static readonly attachment: string;
}
export type DispositionTypeNames = DispositionTypeNames$instance;
export abstract class MediaTypeNames$instance {
}
export type MediaTypeNames = MediaTypeNames$instance;
export abstract class MediaTypeNames_Application$instance {
static readonly formUrlEncoded: string;
static readonly gZip: string;
static readonly json: string;
static readonly jsonPatch: string;
static readonly jsonSequence: string;
static readonly manifest: string;
static readonly octet: string;
static readonly pdf: string;
static readonly problemJson: string;
static readonly problemXml: string;
static readonly rtf: string;
static readonly soap: string;
static readonly wasm: string;
static readonly xml: string;
static readonly xmlDtd: string;
static readonly xmlPatch: string;
static readonly yaml: string;
static readonly zip: string;
}
export type MediaTypeNames_Application = MediaTypeNames_Application$instance;
export abstract class MediaTypeNames_Font$instance {
static readonly collection: string;
static readonly otf: string;
static readonly sfnt: string;
static readonly ttf: string;
static readonly woff: string;
static readonly woff2: string;
}
export type MediaTypeNames_Font = MediaTypeNames_Font$instance;
export abstract class MediaTypeNames_Image$instance {
static readonly avif: string;
static readonly bmp: string;
static readonly gif: string;
static readonly icon: string;
static readonly jpeg: string;
static readonly png: string;
static readonly svg: string;
static readonly tiff: string;
static readonly webp: string;
}
export type MediaTypeNames_Image = MediaTypeNames_Image$instance;
export abstract class MediaTypeNames_Multipart$instance {
static readonly byteRanges: string;
static readonly formData: string;
static readonly mixed: string;
static readonly related: string;
}
export type MediaTypeNames_Multipart = MediaTypeNames_Multipart$instance;
export abstract class MediaTypeNames_Text$instance {
static readonly css: string;
static readonly csv: string;
static readonly eventStream: string;
static readonly html: string;
static readonly javaScript: string;
static readonly markdown: string;
static readonly plain: string;
static readonly richText: string;
static readonly rtf: string;
static readonly xml: string;
}
export type MediaTypeNames_Text = MediaTypeNames_Text$instance;