public ShortcutInfo( string value, string description, string comment, ShortcutKind kind, IEnumerable <Language> languages, IEnumerable <EnvironmentKind> environments, IEnumerable <string> tags) { Value = value; Description = description; Comment = comment; Kind = kind; Environments = new ReadOnlyCollection <EnvironmentKind>(environments.ToArray()); Languages = new ReadOnlyCollection <Language>(languages.ToArray()); Tags = new ReadOnlyCollection <string>(tags.ToArray()); }
public static string GetTitle(this ShortcutKind kind) { switch (kind) { case ShortcutKind.None: return(""); case ShortcutKind.MemberDeclaration: return("Member Declaration"); case ShortcutKind.DeclarationDefinition: return("Declaration/Definition"); case ShortcutKind.Modifier: return("Modifer"); case ShortcutKind.Specifier: return("Specifier"); case ShortcutKind.Statement: return("Statement"); case ShortcutKind.Operator: return("Operator"); case ShortcutKind.Keyword: return("Keyword"); case ShortcutKind.Type: return("Type"); case ShortcutKind.Other: return("Other"); default: throw new ArgumentException("", nameof(kind)); } }