src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Configuration/BaseProjectConfigurationDimensionProvider.cs
/// <summary>
/// Gets the defaults values for project configuration dimensions for the given unconfigured project.
/// </summary>
/// <param name="unconfiguredProject">Unconfigured project.</param>
/// <returns>Collection of key/value pairs for the defaults values for the configuration dimensions of this provider for given project.</returns>
/// <remarks>
/// From <see cref="IProjectConfigurationDimensionsProvider"/>.
/// The interface expectes a collection of key/value pairs containing one or more dimensions along with a single values for each
/// dimension. In this implementation each provider is representing a single dimension.
/// </remarks>
Gets the defaults values for project configuration dimensions for the given unconfigured project.
Gets the defaults values for project configuration dimensions for the given unconfigured project .
public virtual async Task<IEnumerable<KeyValuePair<string, string>>> GetDefaultValuesForDimensionsAsync(UnconfiguredProject unconfiguredProject)
        {
            Requires.NotNull(unconfiguredProject, nameof(unconfiguredProject));
            var values = await GetOrderedPropertyValuesAsync(unconfiguredProject).ConfigureAwait(false);
            if (values.IsEmpty)
            {
                return ImmutableArray<KeyValuePair<string, string>>.Empty;
            }
            else
            {
                var defaultValues = ImmutableArray.CreateBuilder<KeyValuePair<string, string>>();
                defaultValues.Add(new KeyValuePair<string, string>(DimensionName, values.First()));
                return defaultValues.ToImmutable();
            }
        }
public virtual async Task < IEnumerable < KeyValuePair < string , string > > > GetDefaultValuesForDimensionsAsync ( UnconfiguredProject unconfiguredProject ) { Requires . NotNull ( unconfiguredProject , nameof ( unconfiguredProject ) ) ; var values = await GetOrderedPropertyValuesAsync ( unconfiguredProject ) . ConfigureAwait ( false ) ; if ( values . IsEmpty ) { return ImmutableArray < KeyValuePair < string , string > > . Empty ; } else { var defaultValues = ImmutableArray . CreateBuilder < KeyValuePair < string , string > > ( ) ; defaultValues . Add ( new KeyValuePair < string , string > ( DimensionName , values . First ( ) ) ) ; return defaultValues . ToImmutable ( ) ; } }
Gets the defaults values for project configuration dimensions for the given unconfigured project.
Gets the defaults values for project configuration dimensions for the given unconfigured project .
// First value is the default one.
Collection of key/value pairs for the defaults values for the configuration dimensions of this provider for given project.
Collection of key / value pairs for the defaults values for the configuration dimensions of this provider for given project .
unconfiguredProject
UnconfiguredProject
None
remarks
From .
The interface expectes a collection of key/value pairs containing one or more dimensions along with a single values for each
dimension. In this implementation each provider is representing a single dimension.
From . The interface expectes a collection of key / value pairs containing one or more dimensions along with a single values for each dimension . In this implementation each provider is representing a single dimension .