public static bool TryPop<T>(ref System.Collections.Immutable.ImmutableStack<T> location, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T value) { throw null; }
public static bool TryRemove<TKey, TValue>(ref System.Collections.Immutable.ImmutableDictionary<TKey, TValue> location, TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) where TKey : notnull { throw null; }
public static bool TryUpdate<TKey, TValue>(ref System.Collections.Immutable.ImmutableDictionary<TKey, TValue> location, TKey key, TValue newValue, TValue comparisonValue) where TKey : notnull { throw null; }
- public static bool Update<T>(ref T location, System.Func<T, T> transformer) where T : class { throw null; }
- public static bool Update<T, TArg>(ref T location, System.Func<T, TArg, T> transformer, TArg transformerArgument) where T : class { throw null; }
+ public static bool Update<T>(ref T location, System.Func<T, T> transformer) where T : class? { throw null; }
+ public static bool Update<T, TArg>(ref T location, System.Func<T, TArg, T> transformer, TArg transformerArgument) where T : class? { throw null; }
public static bool Update<T>(ref System.Collections.Immutable.ImmutableArray<T> location, Func<System.Collections.Immutable.ImmutableArray<T>, System.Collections.Immutable.ImmutableArray<T>> transformer) { throw null; }
public static bool Update<T, TArg>(ref System.Collections.Immutable.ImmutableArray<T> location, Func<System.Collections.Immutable.ImmutableArray<T>, TArg, System.Collections.Immutable.ImmutableArray<T>> transformer, TArg transformerArgument) { throw null; }
}
/// <c>false</c> if the location's value remained the same because the last
/// invocation of <paramref name="transformer"/> returned the existing value.
/// </returns>
- public static bool Update<T>(ref T location, Func<T, T> transformer) where T : class
+ public static bool Update<T>(ref T location, Func<T, T> transformer) where T : class?
{
Requires.NotNull(transformer, nameof(transformer));
/// <c>false</c> if the location's value remained the same because the last
/// invocation of <paramref name="transformer"/> returned the existing value.
/// </returns>
- public static bool Update<T, TArg>(ref T location, Func<T, TArg, T> transformer, TArg transformerArgument) where T : class
+ public static bool Update<T, TArg>(ref T location, Func<T, TArg, T> transformer, TArg transformerArgument) where T : class?
{
Requires.NotNull(transformer, nameof(transformer));