当前位置: 首页>>代码示例>>C#>>正文


C# ISet.Each方法代码示例

本文整理汇总了C#中ISet.Each方法的典型用法代码示例。如果您正苦于以下问题:C# ISet.Each方法的具体用法?C# ISet.Each怎么用?C# ISet.Each使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISet的用法示例。


在下文中一共展示了ISet.Each方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DbToolSyntaxProvider

        public DbToolSyntaxProvider(IMetaInfoProvider metaInfoProvider)
        {
            _metaInfoProvider = metaInfoProvider;
            _sqlKeywords = new HashSet<string>(new[]{ "select", "insert", "update", "delete", "drop", "distinct",
                "from", "left", "outer", "join", "on",
                "where", "and", "or", "not", "in",
                "group", "order", "by", "asc", "desc" });
            _functions = new HashSet<string>(new[] { "migrate", "up", "down", "show", "set", "vars", "usings", "$" });
            _operators = new HashSet<string>(new[] {"+", "-", "*", "/", "=", "!", "<", ">", "<>"});
            _separators = new HashSet<char>(new[] {' ', '.', ',', ';','=', '+', '-', '<', '>', '(', ')', '\t', '\n', '\r'});
            _settings = new HashSet<string>(GetSettings());
            _cSharpKeywords = new HashSet<string>(new[]{"var", "void", "string", "object", "dynamic",
                "const", "int", "long", "double", "float", "decimal",  "bool", "true", "false", "char",
                "public", "protected", "private", "virtual", "override", "static", "class",
                "switch", "case", "default", "new", "in", "let", "orderby", "descending", "using"});

            _caseSensitiveWords = new Dictionary<string, TagType>();
            _cSharpKeywords.Each(c => _caseSensitiveWords[c] = TagType.CSharp);

            _words = new Dictionary<string, TagType>();
            _sqlKeywords.Each(w => _words[w] = TagType.SqlKeyword);
            _functions.Each(f => _words[f] = TagType.Function);
            _operators.Each(o => _words[o] = TagType.Operator);
            _settings.Each(s => _words[s] = TagType.Setting);
        }
开发者ID:pedershk,项目名称:dotnetprograms,代码行数:25,代码来源:DbToolSyntaxProvider.cs


注:本文中的ISet.Each方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。