NuGet.Preprocessor.ReplaceToken C# (CSharp) Method

ReplaceToken() private static method

private static ReplaceToken ( Match match, IPropertyProvider propertyProvider, bool throwIfNotFound ) : string
match System.Text.RegularExpressions.Match
propertyProvider IPropertyProvider
throwIfNotFound bool
return string
        private static string ReplaceToken(Match match, IPropertyProvider propertyProvider, bool throwIfNotFound)
        {
            string propertyName = match.Groups["propertyName"].Value;
            var value = propertyProvider.GetPropertyValue(propertyName);
            if (value == null && throwIfNotFound)
            {
                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.TokenHasNoValue, propertyName));
            }
            return value;
        }
    }