MarkdownEmojiMapping Class
The shortcodes, such as :smile:, and the smileys, such as :), that MarkdownExtensions.Emoji reads, and their emoji.
public sealed class MarkdownEmojiMappingConstructors
| Name | Description |
|---|---|
| MarkdownEmojiMapping(IReadOnlyDictionary<string, string>, IReadOnlyDictionary<string, string>) | Creates a mapping from shortcodes to emoji, and from smileys to shortcodes. |
MarkdownEmojiMapping(IReadOnlyDictionary<string, string>, IReadOnlyDictionary<string, string>)
MarkdownEmojiMapping.csCreates a mapping from shortcodes to emoji, and from smileys to shortcodes.
public MarkdownEmojiMapping(IReadOnlyDictionary<string, string> shortcodes, IReadOnlyDictionary<string, string> smileys)Parameters
shortcodesIReadOnlyDictionary<string, string>- The emoji of the shortcodes, such as
:smile:. smileysIReadOnlyDictionary<string, string>- The shortcode of the smileys, such as
:), which must be a shortcode ofshortcodes.
Exceptions
ArgumentNullExceptionshortcodesorsmileysisnull.ArgumentException- A key or a value is empty, a key contains a line ending, a smiley is not for a shortcode, or a smiley is a shortcode.
Properties
| Name | Description |
|---|---|
| Default | Gets the shortcodes of GitHub and the arrows, and the common smileys, such as :), ;) and <3. |
| DefaultWithoutSmileys | Gets the shortcodes of GitHub and the arrows, without smileys. |
| Shortcodes | Gets the emoji of the shortcodes, such as :smile:. |
| Smileys | Gets the shortcode of the smileys, such as :): each one is a key of MarkdownEmojiMapping.Shortcodes. |
Default
MarkdownEmojiMapping.csGets the shortcodes of GitHub and the arrows, and the common smileys, such as :), ;) and <3.
public static MarkdownEmojiMapping Default { get; }Property value
DefaultWithoutSmileys
MarkdownEmojiMapping.csGets the shortcodes of GitHub and the arrows, without smileys.
public static MarkdownEmojiMapping DefaultWithoutSmileys { get; }Property value
Shortcodes
MarkdownEmojiMapping.csGets the emoji of the shortcodes, such as :smile:.
public IReadOnlyDictionary<string, string> Shortcodes { get; }Property value
IReadOnlyDictionary<string, string>
Remarks
Use it with MarkdownEmojiMapping.Smileys to make a mapping from another one, such as MarkdownEmojiMapping.Default with fewer smileys.
Smileys
MarkdownEmojiMapping.csGets the shortcode of the smileys, such as :): each one is a key of MarkdownEmojiMapping.Shortcodes.
public IReadOnlyDictionary<string, string> Smileys { get; }Property value
Methods
| Name | Description |
|---|---|
| TryGetEmoji(string, string?) | Gets the emoji of a shortcode or of a smiley. |