@@ -34,7 +34,7 @@ public abstract class ObservableObject : INotifyPropertyChanged, INotifyProperty
3434 /// </summary>
3535 /// <param name="propertyName">(optional) The name of the property that changed.</param>
3636 /// <remarks>The base implementation only raises the <see cref="PropertyChanged"/> event.</remarks>
37- protected virtual void OnPropertyChanged ( [ CallerMemberName ] string propertyName = null ! )
37+ protected virtual void OnPropertyChanged ( [ CallerMemberName ] string ? propertyName = null )
3838 {
3939 PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( propertyName ) ) ;
4040 }
@@ -45,7 +45,7 @@ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName
4545 /// </summary>
4646 /// <param name="propertyName">(optional) The name of the property that changed.</param>
4747 /// <remarks>The base implementation only raises the <see cref="PropertyChanging"/> event.</remarks>
48- protected virtual void OnPropertyChanging ( [ CallerMemberName ] string propertyName = null ! )
48+ protected virtual void OnPropertyChanging ( [ CallerMemberName ] string ? propertyName = null )
4949 {
5050 PropertyChanging ? . Invoke ( this , new PropertyChangingEventArgs ( propertyName ) ) ;
5151 }
@@ -64,7 +64,7 @@ protected virtual void OnPropertyChanging([CallerMemberName] string propertyName
6464 /// The <see cref="PropertyChanging"/> and <see cref="PropertyChanged"/> events are not raised
6565 /// if the current and new value for the target property are the same.
6666 /// </remarks>
67- protected bool SetProperty < T > ( ref T field , T newValue , [ CallerMemberName ] string propertyName = null ! )
67+ protected bool SetProperty < T > ( ref T field , T newValue , [ CallerMemberName ] string ? propertyName = null )
6868 {
6969 return SetProperty ( ref field , newValue , EqualityComparer < T > . Default , propertyName ) ;
7070 }
@@ -81,7 +81,7 @@ protected bool SetProperty<T>(ref T field, T newValue, [CallerMemberName] string
8181 /// <param name="comparer">The <see cref="IEqualityComparer{T}"/> instance to use to compare the input values.</param>
8282 /// <param name="propertyName">(optional) The name of the property that changed.</param>
8383 /// <returns><see langword="true"/> if the property was changed, <see langword="false"/> otherwise.</returns>
84- protected bool SetProperty < T > ( ref T field , T newValue , IEqualityComparer < T > comparer , [ CallerMemberName ] string propertyName = null ! )
84+ protected bool SetProperty < T > ( ref T field , T newValue , IEqualityComparer < T > comparer , [ CallerMemberName ] string ? propertyName = null )
8585 {
8686 if ( comparer . Equals ( field , newValue ) )
8787 {
@@ -115,7 +115,7 @@ protected bool SetProperty<T>(ref T field, T newValue, IEqualityComparer<T> comp
115115 /// The <see cref="PropertyChanging"/> and <see cref="PropertyChanged"/> events are not raised
116116 /// if the current and new value for the target property are the same.
117117 /// </remarks>
118- protected bool SetProperty < T > ( T oldValue , T newValue , Action < T > callback , [ CallerMemberName ] string propertyName = null ! )
118+ protected bool SetProperty < T > ( T oldValue , T newValue , Action < T > callback , [ CallerMemberName ] string ? propertyName = null )
119119 {
120120 return SetProperty ( oldValue , newValue , EqualityComparer < T > . Default , callback , propertyName ) ;
121121 }
@@ -133,7 +133,7 @@ protected bool SetProperty<T>(T oldValue, T newValue, Action<T> callback, [Calle
133133 /// <param name="callback">A callback to invoke to update the property value.</param>
134134 /// <param name="propertyName">(optional) The name of the property that changed.</param>
135135 /// <returns><see langword="true"/> if the property was changed, <see langword="false"/> otherwise.</returns>
136- protected bool SetProperty < T > ( T oldValue , T newValue , IEqualityComparer < T > comparer , Action < T > callback , [ CallerMemberName ] string propertyName = null ! )
136+ protected bool SetProperty < T > ( T oldValue , T newValue , IEqualityComparer < T > comparer , Action < T > callback , [ CallerMemberName ] string ? propertyName = null )
137137 {
138138 if ( comparer . Equals ( oldValue , newValue ) )
139139 {
@@ -201,7 +201,7 @@ protected bool SetProperty<T>(T oldValue, T newValue, IEqualityComparer<T> compa
201201 /// be used to access properties of a model that is directly stored as a property of the current instance.
202202 /// Additionally, this method can only be used if the wrapped item is a reference type.
203203 /// </remarks>
204- protected bool SetProperty < T > ( Expression < Func < T > > propertyExpression , T newValue , [ CallerMemberName ] string propertyName = null ! )
204+ protected bool SetProperty < T > ( Expression < Func < T > > propertyExpression , T newValue , [ CallerMemberName ] string ? propertyName = null )
205205 {
206206 return SetProperty ( propertyExpression , newValue , EqualityComparer < T > . Default , propertyName ) ;
207207 }
@@ -219,7 +219,7 @@ protected bool SetProperty<T>(Expression<Func<T>> propertyExpression, T newValue
219219 /// <param name="comparer">The <see cref="IEqualityComparer{T}"/> instance to use to compare the input values.</param>
220220 /// <param name="propertyName">(optional) The name of the property that changed.</param>
221221 /// <returns><see langword="true"/> if the property was changed, <see langword="false"/> otherwise.</returns>
222- protected bool SetProperty < T > ( Expression < Func < T > > propertyExpression , T newValue , IEqualityComparer < T > comparer , [ CallerMemberName ] string propertyName = null ! )
222+ protected bool SetProperty < T > ( Expression < Func < T > > propertyExpression , T newValue , IEqualityComparer < T > comparer , [ CallerMemberName ] string ? propertyName = null )
223223 {
224224 PropertyInfo ? parentPropertyInfo ;
225225 FieldInfo ? parentFieldInfo = null ;
@@ -292,7 +292,7 @@ parentExpression.Expression is ConstantExpression instanceExpression &&
292292 /// indicates that the new value being assigned to <paramref name="field"/> is different than the previous one,
293293 /// and it does not mean the new <typeparamref name="TTask"/> instance passed as argument is in any particular state.
294294 /// </remarks>
295- protected bool SetPropertyAndNotifyOnCompletion < TTask > ( ref TTask ? field , Expression < Func < TTask ? > > fieldExpression , TTask ? newValue , [ CallerMemberName ] string propertyName = null ! )
295+ protected bool SetPropertyAndNotifyOnCompletion < TTask > ( ref TTask ? field , Expression < Func < TTask ? > > fieldExpression , TTask ? newValue , [ CallerMemberName ] string ? propertyName = null )
296296 where TTask : Task
297297 {
298298 // We invoke the overload with a callback here to avoid code duplication, and simply pass an empty callback.
@@ -324,7 +324,7 @@ protected bool SetPropertyAndNotifyOnCompletion<TTask>(ref TTask? field, Express
324324 /// The <see cref="PropertyChanging"/> and <see cref="PropertyChanged"/> events are not raised
325325 /// if the current and new value for the target property are the same.
326326 /// </remarks>
327- protected bool SetPropertyAndNotifyOnCompletion < TTask > ( ref TTask ? field , Expression < Func < TTask ? > > fieldExpression , TTask ? newValue , Action < TTask ? > callback , [ CallerMemberName ] string propertyName = null ! )
327+ protected bool SetPropertyAndNotifyOnCompletion < TTask > ( ref TTask ? field , Expression < Func < TTask ? > > fieldExpression , TTask ? newValue , Action < TTask ? > callback , [ CallerMemberName ] string ? propertyName = null )
328328 where TTask : Task
329329 {
330330 if ( ReferenceEquals ( field , newValue ) )
0 commit comments