Skip to content

Commit

Permalink
chore: ensure a single definition for DialogResult
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Jun 13, 2023
1 parent 24ff55c commit 553ffd2
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/Prism.Core/Dialogs/DialogResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ namespace Prism.Dialogs;
/// An <see cref="IDialogResult"/> that contains <see cref="IDialogParameters"/> from the dialog
/// and the <see cref="ButtonResult"/> of the dialog.
/// </summary>
#if NET6_0_OR_GREATER
public record DialogResult : IDialogResult
{
/// <summary>
Expand All @@ -18,29 +17,10 @@ public record DialogResult : IDialogResult
/// <summary>
/// The parameters from the dialog.
/// </summary>
public IDialogParameters Parameters { get; init; }
public IDialogParameters Parameters { get; init; } = new DialogParameters();

/// <summary>
/// The result of the dialog.
/// </summary>
public ButtonResult Result { get; init; } = ButtonResult.None;
}
#else
public class DialogResult : IDialogResult
{
/// <summary>
/// An <see cref="System.Exception"/> that was thrown by the DialogService
/// </summary>
public Exception? Exception { get; set; }

/// <summary>
/// The parameters from the dialog.
/// </summary>
public IDialogParameters Parameters { get; set; }

/// <summary>
/// The result of the dialog.
/// </summary>
public ButtonResult Result { get; private set; } = ButtonResult.None;
}
#endif

0 comments on commit 553ffd2

Please sign in to comment.