@@ -159,7 +159,7 @@ static DialogHost()
159
159
/// Close a modal dialog.
160
160
/// </summary>
161
161
/// <param name="dialogIdentifier"> of the instance where the dialog should be closed. Typically this will match an identifer set in XAML. </param>
162
- public static void Close ( object dialogIdentifier )
162
+ public static void Close ( object ? dialogIdentifier )
163
163
=> Close ( dialogIdentifier , null ) ;
164
164
165
165
/// <summary>
@@ -183,7 +183,7 @@ public static void Close(object? dialogIdentifier, object? parameter)
183
183
/// </summary>
184
184
/// <param name="dialogIdentifier">The identifier to use to retrieve the DialogHost</param>
185
185
/// <returns>The DialogSession if one is in process, or null</returns>
186
- public static DialogSession ? GetDialogSession ( object dialogIdentifier )
186
+ public static DialogSession ? GetDialogSession ( object ? dialogIdentifier )
187
187
{
188
188
DialogHost dialogHost = GetInstance ( dialogIdentifier ) ;
189
189
return dialogHost . CurrentSession ;
@@ -194,7 +194,7 @@ public static void Close(object? dialogIdentifier, object? parameter)
194
194
/// </summary>
195
195
/// <param name="dialogIdentifier">of the instance where the dialog should be closed. Typically this will match an identifer set in XAML.</param>
196
196
/// <returns></returns>
197
- public static bool IsDialogOpen ( object dialogIdentifier ) => GetDialogSession ( dialogIdentifier ) ? . IsEnded == false ;
197
+ public static bool IsDialogOpen ( object ? dialogIdentifier ) => GetDialogSession ( dialogIdentifier ) ? . IsEnded == false ;
198
198
199
199
private static DialogHost GetInstance ( object ? dialogIdentifier )
200
200
{
@@ -207,7 +207,7 @@ private static DialogHost GetInstance(object? dialogIdentifier)
207
207
if ( instance . TryGetTarget ( out DialogHost ? dialogInstance ) )
208
208
{
209
209
dialogInstance . Dispatcher . VerifyAccess ( ) ;
210
- if ( dialogIdentifier is null || Equals ( dialogIdentifier , dialogInstance . Identifier ) )
210
+ if ( Equals ( dialogIdentifier , dialogInstance . Identifier ) )
211
211
{
212
212
targets . Add ( dialogInstance ) ;
213
213
}
0 commit comments