Exemplo n.º 1
0
        /// <summary>
        /// Checks the existence of a given key on <see cref="PackageReference"/> and supplies the value in <paramref name="value"/>.
        /// </summary>
        /// <param name="package">The <see cref="PackageReference"/> to check.</param>
        /// <param name="key">The key to search for.</param>
        /// <param name="value">The value of the key, if it was set. <c>string.empty</c> otherwise.</param>
        /// <returns><c>true</c> if the key was set.</returns>
        internal static bool HasValue(this PackageReference package, string key, out string value)
        {
            var hasValue = package.HasValue(key);

            value = package.GetValue(key) ?? string.Empty;
            return(hasValue);
        }