Skip to content

Commit 88e22b7

Browse files
author
Stedra Kristóf
committed
Rename dialog component classes
1 parent 29f9a31 commit 88e22b7

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

src/AutSoft.Mud.Blazor/Dialog/Confirm/ConfirmDialog.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@inherits DialogComponentBaseTParameterTResult<ConfirmDialogParameters, bool>
1+
@inherits DialogComponentBase<ConfirmDialogParameters, bool>
22
@inject BlazorComponentLocalizer Localizer
33

44
<MudDialog>

src/AutSoft.Mud.Blazor/Dialog/DialogComponentBase_TParameter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace AutSoft.Mud.Blazor.Dialog;
66
/// Base class for dialog components with parameter.
77
/// </summary>
88
/// <typeparam name="TParameter">Parameter type.</typeparam>
9-
public abstract class DialogComponentBaseTParameter<TParameter> : DialogComponentBase
9+
public abstract class DialogComponentBase<TParameter> : DialogComponentBase
1010
{
1111
/// <summary>
1212
/// Parameter of the dialog.

src/AutSoft.Mud.Blazor/Dialog/DialogComponentBase_TParameter_TResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace AutSoft.Mud.Blazor.Dialog;
55
/// </summary>
66
/// <typeparam name="TParameter">Parameter type.</typeparam>
77
/// <typeparam name="TResult">Return value type.</typeparam>
8-
public abstract class DialogComponentBaseTParameterTResult<TParameter, TResult> : DialogComponentBaseTParameter<TParameter>
8+
public abstract class DialogComponentBase<TParameter, TResult> : DialogComponentBase<TParameter>
99
{
1010
/// <summary>
1111
/// Close dialog.

src/AutSoft.Mud.Blazor/Dialog/DialogComponentBase_TResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace AutSoft.Mud.Blazor.Dialog;
44
/// Base class for dialog components with return value.
55
/// </summary>
66
/// <typeparam name="TResult">Return value type.</typeparam>
7-
public class DialogComponentBaseTResult<TResult> : DialogComponentBase
7+
public class DialogComponentBaseWithResult<TResult> : DialogComponentBase
88
{
99
/// <summary>
1010
/// Close dialog.

src/AutSoft.Mud.Blazor/Dialog/DialogServiceExtensions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ public static Task ShowDialogAsync<TDialog>(this IDialogService dialogService)
2121
/// <typeparam name="TDialog">Dialog type to show.</typeparam>
2222
/// <typeparam name="TParameter">Parameter type.</typeparam>
2323
public static Task ShowDialogAsync<TDialog, TParameter>(this IDialogService dialogService, TParameter parameter, DialogOptions? dialogOptions = null)
24-
where TDialog : DialogComponentBaseTParameter<TParameter> =>
24+
where TDialog : DialogComponentBase<TParameter> =>
2525
dialogService.Show<TDialog>(
2626
string.Empty,
2727
new DialogParameters
2828
{
29-
[nameof(DialogComponentBaseTParameter<TParameter>.Parameter)] = parameter,
29+
[nameof(DialogComponentBase<TParameter>.Parameter)] = parameter,
3030
},
3131
dialogOptions).Result;
3232

@@ -37,13 +37,13 @@ public static Task ShowDialogAsync<TDialog, TParameter>(this IDialogService dial
3737
/// <typeparam name="TParameter">Parameter type.</typeparam>
3838
/// <typeparam name="TResult">Result type.</typeparam>
3939
public static async Task<TResult> ShowDialogResultAsync<TDialog, TParameter, TResult>(this IDialogService dialogService, TParameter parameter, DialogOptions? dialogOptions = null)
40-
where TDialog : DialogComponentBaseTParameterTResult<TParameter, TResult>
40+
where TDialog : DialogComponentBase<TParameter, TResult>
4141
{
4242
var result = await dialogService.Show<TDialog>(
4343
string.Empty,
4444
new DialogParameters
4545
{
46-
[nameof(DialogComponentBaseTParameter<TParameter>.Parameter)] = parameter,
46+
[nameof(DialogComponentBase<TParameter>.Parameter)] = parameter,
4747
},
4848
dialogOptions).Result;
4949

@@ -56,7 +56,7 @@ public static async Task<TResult> ShowDialogResultAsync<TDialog, TParameter, TRe
5656
/// <typeparam name="TDialog">Dialog type to show.</typeparam>
5757
/// <typeparam name="TResult">Result type</typeparam>
5858
public static async Task<TResult> ShowDialogResultAsync<TDialog, TResult>(this IDialogService dialogService, DialogOptions? dialogOptions = null)
59-
where TDialog : DialogComponentBaseTResult<TResult>
59+
where TDialog : DialogComponentBaseWithResult<TResult>
6060
{
6161
var result = await dialogService.Show<TDialog>(string.Empty, dialogOptions).Result;
6262
return (TResult)result.Data;

src/AutSoft.Mud.Blazor/Dialog/Error/ErrorDialog.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@using AutSoft.Mud.Blazor.ErrorHandling
2-
@inherits Dialog.DialogComponentBaseTParameter<ErrorDialogParameter>
2+
@inherits Dialog.DialogComponentBase<ErrorDialogParameter>
33
@inject BlazorComponentLocalizer Localizer
44

55
<div class="error-dialog-root">

0 commit comments

Comments
 (0)