コード例 #1
0
        /// <summary>
        /// Gets the value of this pattern with applied matching results.
        /// </summary>
        /// <param name="matchingResults">The matching results.</param>
        /// <returns>
        /// A string value of this patthern.
        /// </returns>
        public override string GetValue(IList <string> matchingResults)
        {
            Assert.ArgumentNotNull(matchingResults, "matchingResults");

            if (NextToken != null)
            {
                return(SearchValue + NextToken.GetValue(matchingResults));
            }

            return(SearchValue);
        }
コード例 #2
0
ファイル: WildcardToken.cs プロジェクト: syrompetka/mudclient
        /// <summary>
        /// Gets the value of this pattern with applied matching results.
        /// </summary>
        /// <param name="matchingResults">The matching results.</param>
        /// <returns>
        /// A string value of this patthern.
        /// </returns>
        public override string GetValue(IList <string> matchingResults)
        {
            Assert.ArgumentNotNull(matchingResults, "matchingResults");

            var val = matchingResults[_wildcardNumber] ?? string.Empty;

            if (NextToken != null)
            {
                return(val + NextToken.GetValue(matchingResults));
            }

            return(val);
        }