API Reference
Class
ConditionalComments
Provides helpers for wrapping content with Outlook conditional comments.
Inheritance
- Object
- ConditionalComments
Methods
public static String GetConditionalEndTag() #Returns:
StringGets the conditional comment end tag used for Outlook and IE.
public static String GetConditionalStartTag(String condition = "(gte mso 9)|(IE)") #Returns:
StringGets the conditional comment start tag used for Outlook and IE.
Parameters
- condition System.String = "(gte mso 9)|(IE)"
Wrap 3 overloads
public static String Wrap(String content, ConditionalType type = OutlookIE) #Returns:
StringWraps the specified content with Outlook conditional comments.
Parameters
- content System.String
- Content to wrap.
- type HtmlForgeX.Email.ConditionalComments.ConditionalType = OutlookIE
- The conditional type to use.
Returns
Wrapped string.
public static String Wrap(String content, String condition) #Returns:
StringWraps the specified content with a custom condition.
Parameters
- content System.String
- Content to wrap.
- condition System.String
- 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:
VoidWraps HTML generated by the provided builder with Outlook conditional comments.
Parameters
- sb System.Text.StringBuilder
- StringBuilder to append output to.
- startHtml System.String
- HTML inserted inside the opening conditional comment.
- endHtml System.String
- HTML inserted inside the closing conditional comment.
- contentBuilder System.Action{System.Text.StringBuilder}
- Builder that emits the content between wrappers.
- type HtmlForgeX.Email.ConditionalComments.ConditionalType = OutlookIE
- The conditional type to use.