Skip to content

Commit

Permalink
OpenAsync method signature changed to virtual to support unit testing (
Browse files Browse the repository at this point in the history
…#1117)

Co-authored-by: Thorsten Liborius <[email protected]>
  • Loading branch information
thliborius and Thorsten Liborius authored Aug 18, 2023
1 parent ae1f280 commit 8476fdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Radzen.Blazor/DialogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void UriHelper_OnLocationChanged(object sender, Microsoft.AspNetCore.Com
/// <param name="title">The text displayed in the title bar of the dialog.</param>
/// <param name="parameters">The dialog parameters. Passed as property values of <typeparamref name="T" />.</param>
/// <param name="options">The dialog options.</param>
public void Open<T>(string title, Dictionary<string, object> parameters = null, DialogOptions options = null) where T : ComponentBase
public virtual void Open<T>(string title, Dictionary<string, object> parameters = null, DialogOptions options = null) where T : ComponentBase
{
OpenDialog<T>(title, parameters, options);
}
Expand All @@ -146,7 +146,7 @@ public void Refresh()
/// <param name="parameters">The dialog parameters. Passed as property values of <typeparamref name="T" />.</param>
/// <param name="options">The dialog options.</param>
/// <returns>The value passed as argument to <see cref="Close" />.</returns>
public Task<dynamic> OpenAsync<T>(string title, Dictionary<string, object> parameters = null, DialogOptions options = null) where T : ComponentBase
public virtual Task<dynamic> OpenAsync<T>(string title, Dictionary<string, object> parameters = null, DialogOptions options = null) where T : ComponentBase
{
var task = new TaskCompletionSource<dynamic>();
tasks.Add(task);
Expand Down Expand Up @@ -199,7 +199,7 @@ public void CloseSide(dynamic result = null)
/// <param name="childContent">The content displayed in the dialog.</param>
/// <param name="options">The dialog options.</param>
/// <returns>The value passed as argument to <see cref="Close" />.</returns>
public Task<dynamic> OpenAsync(string title, RenderFragment<DialogService> childContent, DialogOptions options = null)
public virtual Task<dynamic> OpenAsync(string title, RenderFragment<DialogService> childContent, DialogOptions options = null)
{
var task = new TaskCompletionSource<dynamic>();
tasks.Add(task);
Expand All @@ -219,7 +219,7 @@ public Task<dynamic> OpenAsync(string title, RenderFragment<DialogService> child
/// <param name="title">The text displayed in the title bar of the dialog.</param>
/// <param name="childContent">The content displayed in the dialog.</param>
/// <param name="options">The dialog options.</param>
public void Open(string title, RenderFragment<DialogService> childContent, DialogOptions options = null)
public virtual void Open(string title, RenderFragment<DialogService> childContent, DialogOptions options = null)
{
options = options ?? new DialogOptions();

Expand Down

0 comments on commit 8476fdb

Please sign in to comment.