public StrongReferenceClosureActionComparer(InvariantObjectAndT <object?> source)
 {
     Debug.Assert(!typeof(TClosure).IsValueType);
     this.source      = source;
     callbackComparer = EqualityComparer <Action <TClosure, TEvent> > .Default;
     closureComparer  = EqualityComparer <TClosure> .Default;
 }
 public bool DoesMatch(InvariantObjectAndT <object?> element)
 => callbackComparer.Equals(Utils.ExpectExactType <Action <TClosure, TEvent> >(source.Value), Utils.ExpectExactType <Action <TClosure, TEvent> >(element.Value)) &&
 closureComparer.Equals(Utils.ExpectExactTypeOrNull <TClosure>(source.ValueT), Utils.ExpectExactTypeOrNull <TClosure>(element.ValueT));
 public bool DoesMatch(InvariantObjectAndT <TClosure> element)
 => callbackComparer.Equals(Utils.ExpectExactType <Action <TClosure, TEvent> >(source.Value), Utils.ExpectExactType <Action <TClosure, TEvent> >(element.Value)) &&
 EqualityComparer <TClosure> .Default.Equals(source.ValueT, element.ValueT);
Exemple #4
0
 public void Invoke(TEvent argument, InvariantObjectAndT <TClosure?> callback)
 => Utils.ExecuteActionLike(callback.Value, callback.ValueT);