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


C# RegularExpressions.Group类代码示例

本文整理汇总了C#中System.Text.RegularExpressions.Group的典型用法代码示例。如果您正苦于以下问题:C# Group类的具体用法?C# Group怎么用?C# Group使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Group类属于System.Text.RegularExpressions命名空间,在下文中一共展示了Group类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReplaceUrlWithAbsoluteUrl

 void ReplaceUrlWithAbsoluteUrl(StringBuilder builder, Group matchedUrlGroup, string currentDirectory)
 {
     var relativeUrl = matchedUrlGroup.Value.Trim('"', '\'');
     var absoluteUrl = CreateAbsoluteUrl(relativeUrl, currentDirectory);
     builder.Remove(matchedUrlGroup.Index, matchedUrlGroup.Length);
     builder.Insert(matchedUrlGroup.Index, absoluteUrl);
 }
开发者ID:ryansroberts,项目名称:knapsack,代码行数:7,代码来源:StylesheetModuleWriter.cs

示例2: GetPathThroughLastSlash

 private string GetPathThroughLastSlash(SourceText text, int position, Group quotedPathGroup)
 {
     return PathCompletionUtilities.GetPathThroughLastSlash(
         quotedPath: quotedPathGroup.Value,
         quotedPathStart: GetQuotedPathStart(text, position, quotedPathGroup),
         position: position);
 }
开发者ID:rivalinx,项目名称:roslyn,代码行数:7,代码来源:LoadCommandCompletionProvider.cs

示例3: CreateFrames

 private IEnumerable<Frame> CreateFrames(
     Group framesGroup)
 {
     return 
         from Capture capture in framesGroup.Captures
         select CreateFrame(capture.Value);
 }
开发者ID:jakubka,项目名称:Bowling,代码行数:7,代码来源:BowlingLineParser.cs

示例4: GetTextChangeSpan

 private TextSpan GetTextChangeSpan(SourceText text, int position, Group quotedPathGroup)
 {
     return PathCompletionUtilities.GetTextChangeSpan(
         quotedPath: quotedPathGroup.Value,
         quotedPathStart: GetQuotedPathStart(text, position, quotedPathGroup),
         position: position);
 }
开发者ID:rivalinx,项目名称:roslyn,代码行数:7,代码来源:LoadCommandCompletionProvider.cs

示例5: Synchronized

    public static Group Synchronized(Group inner)
    {
      Contract.Ensures(Contract.Result<System.Text.RegularExpressions.Group>() != null);
      Contract.Ensures(Contract.Result<System.Text.RegularExpressions.Group>() == inner);

      return default(Group);
    }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:7,代码来源:System.Text.RegularExpressions.Group.cs

示例6: ConcatenateCaptures

 /// <summary>
 /// Concatenates the captures of <paramref name="group" /> to a string.
 /// </summary>
 /// <param name="group"><see cref="Group" /> containing the captures.</param>
 /// <returns>
 /// <see cref="string" /> containg the concatenated captures.
 /// </returns>
 /// <remarks>
 /// A named-group can captured multiple times, when the regular
 /// expression has a quantifier, e.g. (// (?'Text'.*) )* will match
 /// multiline comments with group <i>Text</i> having a capture for
 /// every line.
 /// </remarks>
 private string ConcatenateCaptures(Group group) {
     StringBuilder sb = new StringBuilder();
     foreach (Capture capture in group.Captures) {
         sb.Append(capture.Value);
     }
     return sb.ToString();
 }
开发者ID:kiprainey,项目名称:nantcontrib,代码行数:20,代码来源:Pattern.cs

示例7: Synchronized

    public static Group Synchronized(Group inner)
    {
      Contract.Requires(inner != null);
      Contract.Ensures(Contract.Result<Group>() != null);

      return default(Group);
    }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:7,代码来源:System.Text.RegularExpressions.Group.cs

示例8: AddSubNode

        private void AddSubNode(int parentNodeIndex, string caption, Group captureGroup, int groupIndex)
        {
            TreeNode newNode = makeCaptureNode(caption);

            Nodes[parentNodeIndex].Nodes.Add(newNode);
            Nodes[parentNodeIndex].Nodes[groupIndex - 1].Tag = captureGroup;
            Nodes[parentNodeIndex].Expand();
        }
开发者ID:Nullstr1ng,项目名称:dotnet-regex-tools,代码行数:8,代码来源:MatchesTreeView.cs

示例9: DisplayCaptures

        private static void DisplayCaptures(Group group, TreeNode groupRoot)
        {
            foreach (Capture capture in group.Captures)
            {
                TreeNode captureRoot = new TreeNode(capture.Value);
                groupRoot.Nodes.Add(captureRoot);

            }
        }
开发者ID:Nullstr1ng,项目名称:dotnet-regex-tools,代码行数:9,代码来源:MatchesTree.cs

示例10: ParseDouble

        public static double ParseDouble(Group @group)
        {
            if (@group.Captures.Count != 1)
            {
                throw new ArgumentException("Expected single capture");
            }

            return ParseDouble(@group.Value);
        }
开发者ID:EMostafaAli,项目名称:mathnet-spatial,代码行数:9,代码来源:Parser.cs

示例11: GroupToInt

 private static int GroupToInt(Group g)
 {
     int value;
     if (int.TryParse(g.ToString(), out value))
     {
         return value;
     }
     return -1;
 }
开发者ID:terenced,项目名称:SharpDuster,代码行数:9,代码来源:FileSanitizer.cs

示例12: EditUserForm

        public EditUserForm()
        {
            InitializeComponent();

            _userName = string.Empty;
            _password = string.Empty;
            GroupId = -1;
            Groups = new Group[0];
        }
开发者ID:Dehax,项目名称:DehaxOS,代码行数:9,代码来源:EditUserForm.cs

示例13: ParseParameterGroup

        private static IReadOnlyList<UriParameter> ParseParameterGroup(Group group)
        {
            if (!group.Success)
                return new UriParameter[] { };

            var parameters = group.Value;
            var splitByAmpersand = parameters.Split('&');
            return splitByAmpersand.Select(ParseParameterPart).ToArray();
        }
开发者ID:Jark,项目名称:restup,代码行数:9,代码来源:UriParser.cs

示例14: GetImageFilename

 string GetImageFilename(Group matchedUrlGroup, string currentDirectory)
 {
     var originalUrl = matchedUrlGroup.Value.Trim('"', '\'');
     if (originalUrl.StartsWith("/"))
     {
         return PathUtilities.NormalizePath("~" + originalUrl);
     }
     return PathUtilities.NormalizePath(PathUtilities.CombineWithForwardSlashes(currentDirectory, originalUrl));
 }
开发者ID:JamesTryand,项目名称:cassette,代码行数:9,代码来源:ExpandCssUrlsAssetTransformer.cs

示例15: GetDistinctCount

 private static string GetDistinctCount(string @select, Group g, string @from)
 {
     var columns = g.ToString().Trim();
     if(columns == "DISTINCT")
     {
         throw new ArgumentException("Malformed SQL; DISTINCT queries must specify at least one column");
     }
     var distinct = string.Concat(@select, "COUNT(", columns,  ") ", @from);
     return distinct;
 }
开发者ID:jtpatil,项目名称:webstack,代码行数:10,代码来源:SqlBuilder.cs


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