AppKit.TextKit.Formatter.MarkDownDescriptor.Define C# (CSharp) Method

Define() public method

Define this instance.
public Define ( ) : void
return void
		public override void Define ()
		{
			base.Define ();

			// Keywords
			// Keywords.Add("", new KeywordDescriptor(KeywordType.Keyword, KeywordColor, ""));

			// Parameters
			// Keywords.Add("", new KeywordDescriptor(KeywordType.MethodParameters, MethodParameterColor, ""));

			// Define HTML formats
			Formats.Add (new FormatDescriptor ("<!--", "-->", CommentColor));
			Formats.Add(new FormatDescriptor ("\"","\"", StringLiteralColor));
			Formats.Add (new FormatDescriptor ("<code>", "</code>", StatementColor));
			Formats.Add (new FormatDescriptor ("`", "`", StatementColor));
			Formats.Add (new FormatDescriptor ("&", ";", PreprocessorDirectiveColor));
			Formats.Add (new FormatDescriptor ("<", ">", KeywordColor));

			// Define MarkDown formats
			Formats.Add (new FormatDescriptor ("#", TypeColor));
			Formats.Add (new FormatDescriptor (">", ValueTypeColor));
			Formats.Add (new FormatDescriptor ("[", "]", ReferenceTypeColor));
			Formats.Add (new FormatDescriptor ("(", ")", AccessModifierColor));
			Formats.Add (new FormatDescriptor ("**", "**", ModifierColor));
			Formats.Add (new FormatDescriptor ("_", "_", SelectionStatementColor));

			// Define additional closures
			Closures.Add(new LanguageClosure('*'));
			Closures.Add(new LanguageClosure('_'));
			Closures.Add(new LanguageClosure('`'));

			// Define formatting commands
			FormattingCommands.Add(new LanguageFormatCommand("Stong","**","**"));
			FormattingCommands.Add(new LanguageFormatCommand("Emphasize","_","_"));
			FormattingCommands.Add(new LanguageFormatCommand("Inline Code","`","`"));
			FormattingCommands.Add(new LanguageFormatCommand("Code Block","```\n","\n```"));
			FormattingCommands.Add(new LanguageFormatCommand("Comment","<!--","-->"));
			FormattingCommands.Add (new LanguageFormatCommand ());
			FormattingCommands.Add(new LanguageFormatCommand("Unordered List","* "));
			FormattingCommands.Add(new LanguageFormatCommand("Ordered List","1. "));
			FormattingCommands.Add(new LanguageFormatCommand("Block Quote","> "));
			FormattingCommands.Add (new LanguageFormatCommand ());

			var Headings = new LanguageFormatCommand ("Headings");
			Headings.SubCommands.Add(new LanguageFormatCommand("Heading 1","# "));
			Headings.SubCommands.Add(new LanguageFormatCommand("Heading 2","## "));
			Headings.SubCommands.Add(new LanguageFormatCommand("Heading 3","### "));
			Headings.SubCommands.Add(new LanguageFormatCommand("Heading 4","#### "));
			Headings.SubCommands.Add(new LanguageFormatCommand("Heading 5","##### "));
			Headings.SubCommands.Add(new LanguageFormatCommand("Heading 6","###### "));
			FormattingCommands.Add (Headings);

			FormattingCommands.Add(new LanguageFormatCommand ());
			FormattingCommands.Add(new LanguageFormatCommand("Link","[","]()"));
			FormattingCommands.Add(new LanguageFormatCommand("Image","![](",")"));
			FormattingCommands.Add(new LanguageFormatCommand("Image Link","[ ![](",")](LinkImageHere)"));
		}