HtmlForgeX

API Reference

Class

ConditionalComments

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Modifiers static

Provides helpers for wrapping content with Outlook conditional comments.

Inheritance

  • Object
  • ConditionalComments

Methods

public static String GetConditionalEndTag() #
Returns: String

Gets the conditional comment end tag used for Outlook and IE.

public static String GetConditionalStartTag(String condition = "(gte mso 9)|(IE)") #
Returns: String

Gets the conditional comment start tag used for Outlook and IE.

Parameters

condition System.String = "(gte mso 9)|(IE)" optionalposition: 0
Wrap 3 overloads
public static String Wrap(String content, ConditionalType type = OutlookIE) #
Returns: String

Wraps the specified content with Outlook conditional comments.

Parameters

content System.String requiredposition: 0
Content to wrap.
type HtmlForgeX.Email.ConditionalComments.ConditionalType = OutlookIE optionalposition: 1
The conditional type to use.

Returns

Wrapped string.

public static String Wrap(String content, String condition) #
Returns: String

Wraps the specified content with a custom condition.

Parameters

content System.String requiredposition: 0
Content to wrap.
condition System.String requiredposition: 1
The condition to use within the comment.

Returns

Wrapped string.

public static Void Wrap(StringBuilder sb, String startHtml, String endHtml, Action<StringBuilder> contentBuilder, ConditionalType type = OutlookIE) #
Returns: Void

Wraps HTML generated by the provided builder with Outlook conditional comments.

Parameters

sb System.Text.StringBuilder requiredposition: 0
StringBuilder to append output to.
startHtml System.String requiredposition: 1
HTML inserted inside the opening conditional comment.
endHtml System.String requiredposition: 2
HTML inserted inside the closing conditional comment.
contentBuilder System.Action{System.Text.StringBuilder} requiredposition: 3
Builder that emits the content between wrappers.
type HtmlForgeX.Email.ConditionalComments.ConditionalType = OutlookIE optionalposition: 4
The conditional type to use.