Skip to content

Commit

Permalink
Un-consolidate ColumnConfiguration constructors (#381)
Browse files Browse the repository at this point in the history
* Un-consolidate ColumnConfiguration constructors

* Add comments
  • Loading branch information
mslukebo authored Nov 5, 2024
1 parent 78158c2 commit b2f9bc3
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions src/Microsoft.Performance.SDK/Processing/ColumnConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,47 @@ namespace Microsoft.Performance.SDK.Processing
/// </summary>
public sealed class ColumnConfiguration
{
/// <summary>
/// Initializes a new instance of the <see cref="ColumnConfiguration"/>
/// class.
/// </summary>
/// <param name="metadata">
/// The metadata about the column.
/// </param>
/// <exception cref="System.ArgumentNullException">
/// <paramref name="metadata"/> is <c>null</c>.
/// </exception>
public ColumnConfiguration(ColumnMetadata metadata)
: this(metadata, null, null)
{
// These telescoping constructors are required to maintain backwards compatibility.
// Do not consolidate to a constructor with optional parameters since that breaks the API.
}

/// <summary>
/// Initializes a new instance of the <see cref="ColumnConfiguration"/>
/// class.
/// </summary>
/// <param name="metadata">
/// The metadata about the column.
/// </param>
/// <param name="hints">
/// Optional hints about displaying this column in the UI. This parameter
/// may be <c>null</c>. If this parameter is <c>null</c>, then
/// <see cref="UIHints.Default"/> will be used for this instance.
/// </param>
/// <exception cref="System.ArgumentNullException">
/// <paramref name="metadata"/> is <c>null</c>.
/// </exception>
public ColumnConfiguration(
ColumnMetadata metadata,
UIHints hints)
: this(metadata, hints, null)
{
// These telescoping constructors are required to maintain backwards compatibility.
// Do not consolidate to a constructor with optional parameters since that breaks the API.
}

/// <summary>
/// Initializes a new instance of the <see cref="ColumnConfiguration"/>
/// class.
Expand All @@ -30,8 +71,8 @@ public sealed class ColumnConfiguration
/// </exception>
public ColumnConfiguration(
ColumnMetadata metadata,
UIHints hints = null,
Guid? variantGuid = null)
UIHints hints,
Guid? variantGuid)
{
Guard.NotNull(metadata, nameof(metadata));

Expand Down

0 comments on commit b2f9bc3

Please sign in to comment.