Пример #1
0
        private void RemoveKeywords(Snippet snippet)
        {
            snippet.RemoveTags(Language.Types.Select(f => KnownTags.GenerateTypeTag(f.Name)));
            snippet.RemoveTags(Language.Modifiers.Select(f => KnownTags.GenerateModifierTag(f.Name)));

            snippet.RemoveTags(
                KnownTags.GenerateType,
                KnownTags.GenerateAccessModifier,
                KnownTags.GenerateInitializer,
                KnownTags.GenerateUnchanged,
                KnownTags.GenerateParameters,
                KnownTags.GenerateArguments,
                KnownTags.GenerateCollection,
                KnownTags.GenerateImmutableCollection,
                KnownTags.Array,
                KnownTags.Collection,
                KnownTags.Dictionary,
                KnownTags.TryParse,
                KnownTags.Initializer);
        }
 public LanguageSnippetGenerator(LanguageDefinition languageDefinition)
 {
     LanguageDefinition    = languageDefinition;
     _generateTypeTags     = LanguageDefinition.Types.Select(f => KnownTags.GenerateTypeTag(f.Name)).ToArray();
     _generateModifierTags = LanguageDefinition.Modifiers.Select(f => KnownTags.GenerateModifierTag(f.Name)).ToArray();
 }