QuotedPrintableEncodingOptions Struct
Definition
- Assembly
- Bodu.Text.Encoding.dll
- Package
- Bodu.Text.Encoding 1.0.0
Configures how QuotedPrintable produces Quoted-Printable output: the line-break treatment, the soft line-wrap column, and the newline sequence.
public readonly struct QuotedPrintableEncodingOptions : IEquatable<QuotedPrintableEncodingOptions>
- Implements
- Inherited Members
- Extension Methods
Remarks
default(QuotedPrintableEncodingOptions) behaves as Binary with a
76-character line limit and a CRLF newline: a zero MaxLineLength is normalized to 76 and a
null NewLine to "\r\n". A zero line length therefore means the RFC default,
not unlimited output.
Constructors
QuotedPrintableEncodingOptions(QuotedPrintableEncodingMode, int, string?)
Initializes a new instance of the QuotedPrintableEncodingOptions struct.
public QuotedPrintableEncodingOptions(QuotedPrintableEncodingMode mode = QuotedPrintableEncodingMode.Binary, int maxLineLength = 76, string? newLine = null)
Parameters
modeQuotedPrintableEncodingModeThe line-break treatment.
maxLineLengthintThe maximum encoded line length, excluding the newline delimiter.
newLinestringThe newline sequence, or null for CRLF.
Properties
Default
Gets the default options: Binary, a 76-character line limit, and a CRLF newline.
public static QuotedPrintableEncodingOptions Default { get; }
Property Value
- QuotedPrintableEncodingOptions
The default Quoted-Printable encoding options.
MaxLineLength
Gets the maximum number of characters per encoded line, excluding the trailing newline delimiter.
public int MaxLineLength { get; init; }
Property Value
- int
The line length, where
0selects the RFC default of76.
Mode
Gets the line-break treatment applied to the source.
public QuotedPrintableEncodingMode Mode { get; init; }
Property Value
- QuotedPrintableEncodingMode
The encoding mode.
NewLine
Gets the newline sequence inserted for soft and hard line breaks.
public string? NewLine { get; init; }
Property Value
Remarks
Only "\r\n" and "\n" are accepted. CRLF is the MIME canonical line ending; "\n" is a
non-canonical convenience profile for local text processing and should not be used for MIME transport. Output
using "\n" round-trips only when decoded with
AllowBareLineFeed.
Text
Gets canonical MIME text options: Text, a 76-character line limit, and a CRLF newline.
public static QuotedPrintableEncodingOptions Text { get; }
Property Value
- QuotedPrintableEncodingOptions
The canonical MIME text encoding options.
Methods
Equals(QuotedPrintableEncodingOptions)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(QuotedPrintableEncodingOptions other)
Parameters
otherQuotedPrintableEncodingOptionsAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(QuotedPrintableEncodingOptions, QuotedPrintableEncodingOptions)
public static bool operator ==(QuotedPrintableEncodingOptions left, QuotedPrintableEncodingOptions right)
Parameters
Returns
operator !=(QuotedPrintableEncodingOptions, QuotedPrintableEncodingOptions)
public static bool operator !=(QuotedPrintableEncodingOptions left, QuotedPrintableEncodingOptions right)
Parameters
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |