Пример #1
0
        private static string ReplaceToken(string propertyName, IPropertyProvider propertyProvider, bool throwIfNotFound)
        {
            object local1;
            object propertyValue = propertyProvider.GetPropertyValue(propertyName);

            if (< > o__4.< > p__3 == null)
            {
                CSharpArgumentInfo[] argumentInfo = new CSharpArgumentInfo[] { CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null) };
Пример #2
0
 private static string ReplaceToken(string propertyName, IPropertyProvider propertyProvider, bool throwIfNotFound)
 {
     var value = propertyProvider.GetPropertyValue(propertyName);
     if (value == null && throwIfNotFound)
     {
         throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.TokenHasNoValue, propertyName));
     }
     return value;
 }
Пример #3
0
 private static string ReplaceToken(Match match, IPropertyProvider propertyProvider)
 {
     string propertyName = match.Groups["propertyName"].Value;
     var value = propertyProvider.GetPropertyValue(propertyName);
     if (value == null) {
         throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.TokenHasNoValue, propertyName));
     }
     return value;
 }
Пример #4
0
        private static string ReplaceToken(string propertyName, IPropertyProvider propertyProvider, bool throwIfNotFound)
        {
            var value = propertyProvider.GetPropertyValue(propertyName);

            if (value == null && throwIfNotFound)
            {
                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.TokenHasNoValue, propertyName));
            }
            return(value);
        }
Пример #5
0
        private static string ReplaceToken(Match match, IPropertyProvider propertyProvider)
        {
            string propertyName = match.Groups["propertyName"].Value;
            var    value        = propertyProvider.GetPropertyValue(propertyName);

            if (value == null)
            {
                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, NuGetResources.TokenHasNoValue, propertyName));
            }
            return(value);
        }
Пример #6
0
 /// <summary>
 /// Retrieves nuget replacement values from a referenced
 /// assembly library or MSBuild property, as specified here:
 /// http://docs.nuget.org/docs/reference/nuspec-reference#Replacement_Tokens
 /// </summary>
 /// <param name="property">
 /// The replacement property to retrieve
 /// </param>
 /// <returns>
 /// The replacement property value
 /// </returns>
 public dynamic GetPropertyValue(String property)
 {
     if (property == "version" && !String.IsNullOrEmpty(version))
     {
         return(version);
     }
     else
     {
         return(propertyProvider.GetPropertyValue(property));
     }
 }