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

    Class MultipartRelated

    A multipart/related MIME entity.

    A multipart/related entity contains inter-related MIME parts that typically reference each other via Content-Id or Content-Location URIs.

    Hierarchy (View Summary)

    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>

    • Tests whether a linked resource URI exists.

      Parameters

      • uri: string | URL

        The resource URI.

      Returns boolean

      true if the URI resolves to a child entity; otherwise false.

    • Gets the index of the entity referenced by a URI.

      Parameters

      • uri: string | URL

        The resource URI.

      Returns number

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

    • Opens the content stream for a linked resource URI.

      Parameters

      • uri: string | URL

        The resource URI.

      Returns Stream

      The decoded resource stream.

    • Opens a linked resource and returns stream metadata.

      Parameters

      • uri: string | URL

        The resource URI.

      Returns { stream: Stream; mimeType: string; charset: string | null }

      The decoded stream, MIME type, and charset.

    • 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

    • 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