private static string ReplaceToken(string propertyName, IMSBuildNuGetProjectSystem msBuildNuGetProjectSystem, bool throwIfNotFound) { var value = msBuildNuGetProjectSystem.GetPropertyValue(propertyName); if (value == null && throwIfNotFound) { throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Strings.TokenHasNoValue, propertyName)); } return value; }
private static string ReplaceToken(string propertyName, IMSBuildNuGetProjectSystem msBuildNuGetProjectSystem, bool throwIfNotFound) { var value = msBuildNuGetProjectSystem.GetPropertyValue(propertyName); if (value == null && throwIfNotFound) { throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Strings.TokenHasNoValue, propertyName)); } return(value); }
internal static string Process(Func <Stream> fileStreamFactory, IMSBuildNuGetProjectSystem msBuildNuGetProjectSystem) { return(NuGet.Common.Preprocessor.Process(fileStreamFactory, propName => msBuildNuGetProjectSystem.GetPropertyValue(propName))); }