mimekit-ts - v1.0.0
    Preparing search index...

    Class Multipart

    A multipart MIME entity containing child MIME entities.

    Multipart entities include a preamble, zero or more body parts, and an optional epilogue separated by a boundary.

    Hierarchy (View Summary)

    Implements

    Index
    headers: HeaderList

    The headers belonging to this MIME entity.

    contentType: ContentType

    The entity's Content-Type value.

    ensureNewLine: boolean = false
    lazyLoaded: Set<LazyField> = ...
    rawBoundaries: (Uint8Array<ArrayBufferLike> | null)[] | null = null

    Raw boundary bytes preserved from parsing, one entry per child.

    rawPreamble: Uint8Array<ArrayBufferLike> | null = null

    Raw preamble bytes preserved from parsing.

    rawEndBoundary: Uint8Array<ArrayBufferLike> | null = null

    Raw closing boundary bytes preserved from parsing.

    rawEpilogue: Uint8Array<ArrayBufferLike> | null = null

    Raw epilogue bytes preserved from parsing.

    • get isDisposed(): boolean

      C#: internal IsDisposed (exposed publicly; upstream tests read it via InternalsVisibleTo).

      Returns boolean

    • get isAttachment(): boolean

      Gets or sets whether this entity is marked as an attachment.

      Setting this updates the Content-Disposition disposition between attachment and inline.

      Returns boolean

    • set isAttachment(value: boolean): void

      Sets whether this entity is marked as an attachment.

      Parameters

      • value: boolean

      Returns void

    • get Boundary(): string | null

      Gets or sets the boundary parameter.

      Returns string | null

    • set Boundary(value: string | null): void

      Sets the boundary parameter.

      Parameters

      • value: string | null

      Returns void

    • get boundary(): string | null

      Gets or sets the boundary parameter.

      Returns string | null

    • set boundary(value: string | null): void

      Sets the boundary parameter.

      Parameters

      • value: string | null

      Returns void

    • get Preamble(): string | null

      Gets or sets the multipart preamble.

      Returns string | null

    • set Preamble(value: string | null): void

      Sets the multipart preamble.

      Parameters

      • value: string | null

      Returns void

    • get preamble(): string | null

      Gets or sets the multipart preamble.

      Returns string | null

    • set preamble(value: string | null): void

      Sets the multipart preamble.

      Parameters

      • value: string | null

      Returns void

    • get Epilogue(): string | null

      Gets or sets the multipart epilogue.

      Returns string | null

    • set Epilogue(value: string | null): void

      Sets the multipart epilogue.

      Parameters

      • value: string | null

      Returns void

    • get epilogue(): string | null

      Gets or sets the multipart epilogue.

      Returns string | null

    • set epilogue(value: string | null): void

      Sets the multipart epilogue.

      Parameters

      • value: string | null

      Returns void

    • get WriteEndBoundary(): boolean

      Gets whether an end boundary should be written.

      Returns boolean

    • get writeEndBoundary(): boolean

      Gets whether an end boundary should be written.

      Returns boolean

    • get Count(): number

      Gets the number of child MIME entities.

      Returns number

    • get count(): number

      Gets the number of child MIME entities.

      Returns number

    • get IsReadOnly(): boolean

      Gets whether the collection is read-only.

      Returns boolean

    • get isReadOnly(): boolean

      Gets whether the collection is read-only.

      Returns boolean

    • C#: MimeEntity.Load. Parses a MIME entity from a stream (or byte buffer), or — given an explicit Content-Type — from a bare content stream (the HttpWebResponse use-case, where headers are parsed separately). Parse errors are returned as an Err (C#: FormatException) per the port's Result convention.

      Parameters

      Returns Result<MimeEntity>

    • C#: MimeEntity.Load. Parses a MIME entity from a stream (or byte buffer), or — given an explicit Content-Type — from a bare content stream (the HttpWebResponse use-case, where headers are parsed separately). Parse errors are returned as an Err (C#: FormatException) per the port's Result convention.

      Parameters

      Returns Result<MimeEntity>

    • C#: MimeEntity.Load. Parses a MIME entity from a stream (or byte buffer), or — given an explicit Content-Type — from a bare content stream (the HttpWebResponse use-case, where headers are parsed separately). Parse errors are returned as an Err (C#: FormatException) per the port's Result convention.

      Parameters

      Returns Result<MimeEntity>

    • Gets the child entity at the specified index.

      Parameters

      • index: number

        The zero-based child index.

      Returns MimeEntity

      The child entity.

      index is out of range.

    • Replaces the child entity at the specified index.

      Parameters

      • index: number

        The zero-based child index.

      • entity: MimeEntity

        The replacement entity.

      Returns void

    • Adds a child entity with its raw boundary as parsed.

      Parameters

      • entity: MimeEntity

        The entity to add.

      • boundary: Uint8Array<ArrayBufferLike> | null

        The raw boundary bytes.

      Returns void

    • Removes all child entities.

      Parameters

      • dispose: boolean = false

        Whether to dispose removed children.

      Returns void

    • Tests whether a child entity is present.

      Parameters

      Returns boolean

      true if the entity is present; otherwise false.

    • Copies child entities into an array.

      Parameters

      • array: MimeEntity[]

        The destination array.

      • arrayIndex: number

        The starting index in array.

      Returns void

    • Removes a child MIME entity.

      Parameters

      Returns boolean

      true if the entity was removed; otherwise false.

    • Gets the index of a child entity.

      Parameters

      Returns number

      The zero-based index, or -1 if not found.

    • Inserts a child entity at the specified index.

      Parameters

      • index: number

        The insertion index.

      • entity: MimeEntity

        The entity to insert.

      Returns void

    • Removes the child entity at the specified index.

      Parameters

      • index: number

        The zero-based child index.

      Returns void

    • Folds preamble or epilogue text for serialization.

      Parameters

      • options: FormatOptions

        Formatting options.

      • text: string

        The text to fold.

      • isEpilogue: boolean

        Whether the text is an epilogue.

      Returns string

      Folded text.

    • Prepares each child entity for transport.

      Parameters

      • constraint: EncodingConstraint

        The encoding constraint.

      • maxLineLength: number = 78

        The maximum encoded line length.

      Returns void