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


C# StringList.AddRange方法代码示例

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


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

示例1: GetFirsts

 public override IList<string> GetFirsts()
 {
     StringList result = new StringList();
       result.AddRange(Prefixes);
       //we assume that prefix is always optional, so string can start with start-end symbol
       result.AddRange(_startEndSymbols);
       return result;
 }
开发者ID:Temperament,项目名称:FiestaShark,代码行数:8,代码来源:StringLiteral.cs

示例2: GetFirsts

 public override IList<string> GetFirsts()
 {
     StringList result = new StringList();
       result.AddRange(base.Prefixes);
       //we assume that prefix is always optional, so number can always start with plain digit
       result.AddRange(new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" });
       // Python float numbers can start with a dot
       if (IsSet(TermOptions.NumberAllowStartEndDot))
     result.Add(DecimalSeparator.ToString());
       return result;
 }
开发者ID:Temperament,项目名称:FiestaShark,代码行数:11,代码来源:NumberLiteral.cs

示例3: Compute

        /// <summary>
        /// Called when the component should do it's actual work.
        /// </summary>
        public override void Compute()
        {
            //validate config
            if (config.Directory == null)
            {
                throw new ComponentException("Directory has not been specified.");
            }
            if (Directory.Exists(config.Directory) == false)
            {
                throw new ComponentException(String.Format("Directory does not exist '{0}'.", config.Directory.Absolute));
            }

            string[] files;
            if (String.IsNullOrEmpty(config.SearchPattern) == true)
            {
                files = Directory.GetFiles(config.Directory, "*", TranslateSearchOption(config.SearchOption));
            }
            else
            {
                files = Directory.GetFiles(config.Directory, config.SearchPattern, TranslateSearchOption(config.SearchOption));
            }

            StringList listOfFiles = new StringList();
            listOfFiles.AddRange(files);

            Workspace.Store("files", listOfFiles);
            Workspace.Store("numberOfFiles", listOfFiles.Count);
            Logger.Trace(String.Format("Found {0} files in the given directory that match given search pattern.", listOfFiles.Count));
        }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:32,代码来源:DirectoryReader.cs

示例4: CommentTerminal

        private bool _isLineComment; //true if NewLine is one of EndSymbols; if yes, EOF is also considered a valid end symbol

        #endregion Fields

        #region Constructors

        public CommentTerminal(String name, string startSymbol, params string[] endSymbols)
            : base(name, TokenCategory.Comment)
        {
            this.StartSymbol = startSymbol;
              this.EndSymbols = new StringList();
              EndSymbols.AddRange(endSymbols);
        }
开发者ID:TheByte,项目名称:sones,代码行数:13,代码来源:CommentTerminal.cs

示例5: LineContinuationTerminal

 public LineContinuationTerminal(string name, params string[] startSymbols) : base(name, TokenCategory.Outline) {
   var symbols = startSymbols.Where(s => !IsNullOrWhiteSpace(s)).ToArray();
   StartSymbols = new StringList(symbols);
   if (StartSymbols.Count == 0)
     StartSymbols.AddRange(_defaultStartSymbols);
   Priority = Terminal.HighestPriority;
 }
开发者ID:cg123,项目名称:xenko,代码行数:7,代码来源:LineContinuationTerminal.cs

示例6: CommentTerminal

 public CommentTerminal(string name, string startSymbol, params string[] endSymbols)
     : base(name, TokenCategory.Comment)
 {
     StartSymbol = startSymbol;
     EndSymbols = new StringList();
     EndSymbols.AddRange(endSymbols);
     Priority = TerminalPriority.High; //assign max priority
 }
开发者ID:HyperSharp,项目名称:Hyperspace.DotLua,代码行数:8,代码来源:CommentTerminal.cs

示例7: CustomViewEngine

        /// <summary>
        /// Constructor
        /// </summary>
        public CustomViewEngine(params string[] additionalLocations)
        {
            StringList viewLocations = new StringList();
            viewLocations.Add("~/Views/{1}/{0}.cshtml");
            viewLocations.Add("~/Views/Shared/{0}.cshtml");
            viewLocations.AddRange(additionalLocations);

            this.PartialViewLocationFormats = viewLocations.ToArray();
            this.ViewLocationFormats = viewLocations.ToArray();
        }
开发者ID:mnoreke,项目名称:MNorekePublic,代码行数:13,代码来源:CustomViewEngine.cs

示例8: GetFirsts

    }//constructor

    public override IList<string> GetFirsts() {
      var result = new StringList();
      result.AddRange(Firsts);
      return result; 
    }
开发者ID:cg123,项目名称:xenko,代码行数:7,代码来源:FreeTextLiteral.cs

示例9: RunCommand

 private void RunCommand(ClientPipelineArgs args)
 {
     string commandname = args.Parameters["name"];
     var sl = new StringList();
     sl.AddRange(ItemList.SelectedItems.Select(item => item.Value));
     if (sl.Count > 0)
     {
         Current.Context.ReportItem.RunCommand(commandname, sl);
     }
     else
     {
         SheerResponse.Alert("You need to select at least one item");
     }
 }
开发者ID:Sitecore,项目名称:AdvancedSystemReporter,代码行数:14,代码来源:ASR.cs

示例10: ReflectionUtilConvertToListTest

 public void ReflectionUtilConvertToListTest()
 {
     StringList stringData = new StringList();
       stringData.AddRange("One", "Two", "Three");
       List<string> updatedList = ReflectionUtil<string>.ConvertToList(new List<string>(stringData.ToArray()));
       Assert.IsNotNull(updatedList);
       Assert.AreEqual(stringData[0], updatedList[0]);
       Assert.AreEqual(stringData[1], updatedList[1]);
       Assert.AreEqual(stringData[2], updatedList[2]);
 }
开发者ID:mnoreke,项目名称:MNorekePublic,代码行数:10,代码来源:ReflectionUtilTest.cs

示例11: GetFirsts

 public override IList<string> GetFirsts()
 {
     StringList result = new StringList();
       result.AddRange(base.Prefixes);
       //we assume that prefix is always optional, so number can always start with plain digit
       result.AddRange(new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" });
       return result;
 }
开发者ID:kayateia,项目名称:scriptdotnet,代码行数:8,代码来源:NumberLiteral2.cs


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