API Reference
EmailTextBlockLine
A single rich-text line used by EmailTextBlock.
Inheritance
- Object
- EmailTextBlockLine
Constructors
public EmailTextBlockLine() #Methods
public EmailTextBlockLine Badge(String text, EmailStatusTone tone = Neutral, EmailFontSize size = Small) #EmailTextBlockLineAdds a compact pill/badge.
Parameters
- text System.String
- tone HtmlForgeX.Email.EmailStatusTone = Neutral
- size HtmlForgeX.Email.EmailFontSize = Small
public EmailTextBlockLine Bytes(Nullable<Int64> bytes, Int32 decimals = 2, EmailBytesUnitSystem unitSystem = Binary, CultureInfo culture = null) #EmailTextBlockLineFormats a byte-size value into a compact representation (e.g., "2.47 MB").
Parameters
- bytes System.Int64
- decimals System.Int32 = 2
- unitSystem HtmlForgeX.Email.EmailBytesUnitSystem = Binary
- culture System.Globalization.CultureInfo = null
public EmailTextBlockLine Bytes(Nullable<Int64> bytes, EmailFontSize size, Int32 decimals = 2, EmailBytesUnitSystem unitSystem = Binary, CultureInfo culture = null) #EmailTextBlockLineFormats a byte-size value into a compact representation (e.g., "2.47 MB").
Parameters
- bytes System.Int64
- size HtmlForgeX.Email.EmailFontSize
- decimals System.Int32 = 2
- unitSystem HtmlForgeX.Email.EmailBytesUnitSystem = Binary
- culture System.Globalization.CultureInfo = null
Bytes(System.Nullable{System.Int64} bytes, System.Int32 decimals, HtmlForgeX.Email.EmailBytesUnitSystem unitSystem, System.Globalization.CultureInfo culture) #Formats a byte-size value into a compact representation (nullable). When the value is null, does nothing.
Parameters
- bytes System.Nullable{System.Int64}
- decimals System.Int32
- unitSystem HtmlForgeX.Email.EmailBytesUnitSystem
- culture System.Globalization.CultureInfo
Bytes(System.Nullable{System.Int64} bytes, HtmlForgeX.Email.EmailFontSize size, System.Int32 decimals, HtmlForgeX.Email.EmailBytesUnitSystem unitSystem, System.Globalization.CultureInfo culture) #Formats a byte-size value into a compact representation (nullable). When the value is null, does nothing.
Parameters
- bytes System.Nullable{System.Int64}
- size HtmlForgeX.Email.EmailFontSize
- decimals System.Int32
- unitSystem HtmlForgeX.Email.EmailBytesUnitSystem
- culture System.Globalization.CultureInfo
public EmailTextBlockLine CompactNumber(Nullable<Int64> value, Int32 decimals = 1, EmailCompactNumberCase suffixCase = Lower, CultureInfo culture = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a compact number (e.g., "1.2k", "3.4M").
Parameters
- value System.Int64
- decimals System.Int32 = 1
- suffixCase HtmlForgeX.Email.EmailCompactNumberCase = Lower
- culture System.Globalization.CultureInfo = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
CompactNumber(System.Nullable{System.Int64} value, System.Int32 decimals, HtmlForgeX.Email.EmailCompactNumberCase suffixCase, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a compact number (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{System.Int64}
- decimals System.Int32
- suffixCase HtmlForgeX.Email.EmailCompactNumberCase
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine Date(Nullable<DateTimeOffset> value, String format = "MMM d, yyyy", CultureInfo culture = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a date using an email-friendly default.
Parameters
- value System.DateTime
- format System.String = "MMM d, yyyy"
- culture System.Globalization.CultureInfo = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
Date(System.Nullable{System.DateTime} value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a date using an email-friendly default (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{System.DateTime}
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
Date(System.DateTimeOffset value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a date using an email-friendly default.
Parameters
- value System.DateTimeOffset
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
Date(System.Nullable{System.DateTimeOffset} value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a date using an email-friendly default (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{System.DateTimeOffset}
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine DateTime(Nullable<DateTimeOffset> value, String format = "MMM d, yyyy · h:mm tt", CultureInfo culture = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a date+time using an email-friendly default.
Parameters
- value System.DateTime
- format System.String = "MMM d, yyyy · h:mm tt"
- culture System.Globalization.CultureInfo = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
DateTime(System.Nullable{System.DateTime} value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a date+time using an email-friendly default (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{System.DateTime}
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
DateTime(System.DateTimeOffset value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a date+time using an email-friendly default.
Parameters
- value System.DateTimeOffset
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
DateTime(System.Nullable{System.DateTimeOffset} value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a date+time using an email-friendly default (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{System.DateTimeOffset}
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine Dot(EmailStatusTone tone = Neutral, EmailFontSize size = Small) #EmailTextBlockLineAdds a colored dot indicator (●) for status-like inline labels.
Parameters
- tone HtmlForgeX.Email.EmailStatusTone = Neutral
- size HtmlForgeX.Email.EmailFontSize = Small
public EmailTextBlockLine Duration(Nullable<TimeSpan> duration, Int32 maxParts = 2, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a duration into a compact representation (e.g., "1h 30m").
Parameters
- duration System.TimeSpan
- maxParts System.Int32 = 2
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
Duration(System.Nullable{System.TimeSpan} duration, System.Int32 maxParts, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a duration into a compact representation (nullable). When the value is null, does nothing.
Parameters
- duration System.Nullable{System.TimeSpan}
- maxParts System.Int32
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine EmailAddress(String email, String text = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineAdds an email address as a mailto link (no manual mailto: required).
Parameters
- email System.String
- text System.String = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
public EmailTextBlockLine Enum<TEnum>(Nullable<TEnum> value, Boolean humanize = true, Nullable<EmailFontSize> size = null) #EmailTextBlockLineType Parameters
- TEnum
Parameters
- value TEnum
- humanize Boolean = true
- size Nullable<EmailFontSize> = null
Enum``1(``0 value, System.Boolean humanize, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Renders an enum value (optionally humanized) without manual formatting.
Parameters
- value ``0
- humanize System.Boolean
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
Enum``1(System.Nullable{``0} value, System.Boolean humanize, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Renders an enum value (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{``0}
- humanize System.Boolean
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine Hash(String hash, Boolean breakAll = true) #EmailTextBlockLineRenders a hash/checksum value in monospace (useful for SHA256/MD5 checksums).
Parameters
- hash System.String
- breakAll System.Boolean = true
public EmailTextBlockLine Hash(String hash, EmailFontSize size, Boolean breakAll = true) #EmailTextBlockLineRenders a hash/checksum value in monospace (useful for SHA256/MD5 checksums).
Parameters
- hash System.String
- size HtmlForgeX.Email.EmailFontSize
- breakAll System.Boolean = true
public EmailTextBlockLine HashCompact(String hash, Int32 head = 12, Int32 tail = 8, String ellipsis = "…") #EmailTextBlockLineRenders a hash/checksum in monospace and truncates the middle for readability.
Parameters
- hash System.String
- head System.Int32 = 12
- tail System.Int32 = 8
- ellipsis System.String = "…"
public EmailTextBlockLine HashCompact(String hash, EmailFontSize size, Int32 head = 12, Int32 tail = 8, String ellipsis = "…") #EmailTextBlockLineRenders a hash/checksum in monospace and truncates the middle for readability.
Parameters
- hash System.String
- size HtmlForgeX.Email.EmailFontSize
- head System.Int32 = 12
- tail System.Int32 = 8
- ellipsis System.String = "…"
public EmailTextBlockLine Icon(String icon, Nullable<EmailStatusTone> tone = null, EmailFontSize size = Small) #EmailTextBlockLineAdds a small icon/glyph. Use emoji or a simple symbol (e.g., ●, ✓, ⚠).
Parameters
- icon System.String
- tone System.Nullable{HtmlForgeX.Email.EmailStatusTone} = null
- size HtmlForgeX.Email.EmailFontSize = Small
public EmailTextBlockLine Id(String id, Boolean breakAll = true) #EmailTextBlockLineRenders an ID-like value in monospace (order IDs, request IDs, etc.).
Parameters
- id System.String
- breakAll System.Boolean = true
public EmailTextBlockLine Id(String id, EmailFontSize size, Boolean breakAll = true) #EmailTextBlockLineRenders an ID-like value in monospace (order IDs, request IDs, etc.).
Parameters
- id System.String
- size HtmlForgeX.Email.EmailFontSize
- breakAll System.Boolean = true
public EmailTextBlockLine IdCompact(String id, Int32 head = 10, Int32 tail = 6, String ellipsis = "…") #EmailTextBlockLineRenders an ID-like value in monospace and truncates the middle for readability.
Parameters
- id System.String
- head System.Int32 = 10
- tail System.Int32 = 6
- ellipsis System.String = "…"
public EmailTextBlockLine IdCompact(String id, EmailFontSize size, Int32 head = 10, Int32 tail = 6, String ellipsis = "…") #EmailTextBlockLineRenders an ID-like value in monospace and truncates the middle for readability.
Parameters
- id System.String
- size HtmlForgeX.Email.EmailFontSize
- head System.Int32 = 10
- tail System.Int32 = 6
- ellipsis System.String = "…"
public EmailTextBlockLine IpAddress(String ipAddress) #EmailTextBlockLineRenders an IP address in monospace (typically no aggressive wrapping).
Parameters
- ipAddress System.String
public EmailTextBlockLine IpAddress(String ipAddress, EmailFontSize size) #EmailTextBlockLineRenders an IP address in monospace (typically no aggressive wrapping).
Parameters
- ipAddress System.String
- size HtmlForgeX.Email.EmailFontSize
public EmailTextBlockLine Link(String text, String href) #EmailTextBlockLineAdds a link.
Parameters
- text System.String
- href System.String
public EmailTextBlockLine Link(String text, String href, EmailFontSize size) #EmailTextBlockLineAdds a link with a specific font size.
Parameters
- text System.String
- href System.String
- size HtmlForgeX.Email.EmailFontSize
public EmailTextBlockLine Money(Nullable<Decimal> amount, String currencySymbol = "$", Int32 decimals = 2, CultureInfo culture = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a currency value (e.g., "$1,234.50").
Parameters
- amount System.Decimal
- currencySymbol System.String = "$"
- decimals System.Int32 = 2
- culture System.Globalization.CultureInfo = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
Money(System.Nullable{System.Decimal} amount, System.String currencySymbol, System.Int32 decimals, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a currency value (nullable). When the value is null, does nothing.
Parameters
- amount System.Nullable{System.Decimal}
- currencySymbol System.String
- decimals System.Int32
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine Monospace(String text, Boolean breakAll = true) #EmailTextBlockLineAdds monospace text (useful for codes/IDs).
Parameters
- text System.String
- breakAll System.Boolean = true
public EmailTextBlockLine Monospace(String text, EmailFontSize size, Boolean breakAll = true) #EmailTextBlockLineAdds monospace text with a specific font size.
Parameters
- text System.String
- size HtmlForgeX.Email.EmailFontSize
- breakAll System.Boolean = true
public EmailTextBlockLine Muted(String text) #EmailTextBlockLineAdds muted text.
Parameters
- text System.String
public EmailTextBlockLine Muted(String text, EmailFontSize size) #EmailTextBlockLineAdds muted text with a specific font size.
Parameters
- text System.String
- size HtmlForgeX.Email.EmailFontSize
public EmailTextBlockLine Number(Nullable<Decimal> value, Int32 decimals = 0, CultureInfo culture = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a number (e.g., "1,234.5").
Parameters
- value System.Decimal
- decimals System.Int32 = 0
- culture System.Globalization.CultureInfo = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
Number(System.Nullable{System.Decimal} value, System.Int32 decimals, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a number (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{System.Decimal}
- decimals System.Int32
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine Percent(Nullable<Decimal> percent, Int32 decimals = 0, CultureInfo culture = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a percent (expects percent units, e.g. 12.3 => "12.3%").
Parameters
- percent System.Decimal
- decimals System.Int32 = 0
- culture System.Globalization.CultureInfo = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
Percent(System.Nullable{System.Decimal} percent, System.Int32 decimals, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a percent (nullable). When the value is null, does nothing.
Parameters
- percent System.Nullable{System.Decimal}
- decimals System.Int32
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine PhoneNumber(String phoneNumber, String text = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineAdds a phone number as a tel link (no manual tel: required).
Parameters
- phoneNumber System.String
- text System.String = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
public EmailTextBlockLine RelativeTime(Nullable<DateTimeOffset> when, Nullable<DateTimeOffset> now = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a timestamp relative to now (e.g., "2h ago", "in 3d").
Parameters
- when System.DateTimeOffset
- now System.Nullable{System.DateTimeOffset} = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
RelativeTime(System.Nullable{System.DateTimeOffset} when, System.Nullable{System.DateTimeOffset} now, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a timestamp relative to now (nullable). When the value is null, does nothing.
Parameters
- when System.Nullable{System.DateTimeOffset}
- now System.Nullable{System.DateTimeOffset}
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine Status(String label, EmailStatusTone tone = Neutral, String meta = "", String href = null, EmailFontSize metaSize = Small) #EmailTextBlockLineRenders a compact status indicator (dot + label + optional meta) without raw HTML.
Parameters
- label System.String
- tone HtmlForgeX.Email.EmailStatusTone = Neutral
- meta System.String = ""
- href System.String = null
- metaSize HtmlForgeX.Email.EmailFontSize = Small
public EmailTextBlockLine Strong(String text) #EmailTextBlockLineAdds bold text.
Parameters
- text System.String
public EmailTextBlockLine Strong(String text, EmailFontSize size) #EmailTextBlockLineAdds bold text with a specific font size.
Parameters
- text System.String
- size HtmlForgeX.Email.EmailFontSize
public EmailTextBlockLine Text(String text) #EmailTextBlockLineAdds plain text.
Parameters
- text System.String
public EmailTextBlockLine Text(String text, EmailFontSize size) #EmailTextBlockLineAdds plain text with a specific font size.
Parameters
- text System.String
- size HtmlForgeX.Email.EmailFontSize
public EmailTextBlockLine Time(Nullable<DateTimeOffset> value, String format = "h:mm tt", CultureInfo culture = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineFormats a time using an email-friendly default.
Parameters
- value System.DateTime
- format System.String = "h:mm tt"
- culture System.Globalization.CultureInfo = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null
Time(System.Nullable{System.DateTime} value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a time using an email-friendly default (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{System.DateTime}
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
Time(System.DateTimeOffset value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a time using an email-friendly default.
Parameters
- value System.DateTimeOffset
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
Time(System.Nullable{System.DateTimeOffset} value, System.String format, System.Globalization.CultureInfo culture, System.Nullable{HtmlForgeX.Email.EmailFontSize} size) #Formats a time using an email-friendly default (nullable). When the value is null, does nothing.
Parameters
- value System.Nullable{System.DateTimeOffset}
- format System.String
- culture System.Globalization.CultureInfo
- size System.Nullable{HtmlForgeX.Email.EmailFontSize}
public EmailTextBlockLine Url(String url, String text = null, Nullable<EmailFontSize> size = null) #EmailTextBlockLineAdds a URL link (no manual formatting required).
Parameters
- url System.String
- text System.String = null
- size System.Nullable{HtmlForgeX.Email.EmailFontSize} = null