Example #1
0
        /// <summary>
        /// Determines if a string matches a segment
        /// </summary>
        /// <param name="piece"></param>
        /// <returns></returns>
        public IMatchResult Match(string piece)
        {
            if (FlagVariableMatchRegex.IsMatch(piece))
            {
                return(new NamedValueMatchResult(Name, piece.Substring(piece.IndexOf(" "))));
            }

            return(null);
        }
Example #2
0
        /// <summary>
        /// Determines if a string matches a segment
        /// </summary>
        /// <param name="piece"></param>
        /// <returns></returns>
        public IMatchResult Match(string piece)
        {
            if (FlagVariableMatchRegex.IsMatch(piece))
            {
                return(new NamedValueMatchResult(Name, "value"));
            }

            return(null);
        }