Beispiel #1
0
 private static bool EqualsExtracted(NeedleLock <T> left, NeedleLock <T> right)
 {
     if (left == null)
     {
         return(right == null);
     }
     return(left._target.Equals(right._target));
 }
Beispiel #2
0
 public bool Equals(NeedleLock <T> other)
 {
     if (other is null)
     {
         return(false);
     }
     return(_target.Equals(other._target));
 }
Beispiel #3
0
 private static bool EqualsExtracted(NeedleLock <T> left, NeedleLock <T> right)
 {
     if (ReferenceEquals(left, null))
     {
         return(ReferenceEquals(right, null));
     }
     Thread.MemoryBarrier();
     return(left._target.Equals(right._target));
 }
Beispiel #4
0
 private static bool NotEqualsExtracted(NeedleLock <T> left, NeedleLock <T> right)
 {
     if (left == null)
     {
         if (right == null)
         {
             return(false);
         }
         return(true);
     }
     return(!left._target.Equals(right._target));
 }
Beispiel #5
0
 public bool Equals(NeedleLock <T> other)
 {
     return(EqualsExtracted(this, other));
 }
Beispiel #6
0
 public bool Equals(NeedleLock <T> other)
 {
     return(!(other is null) && _target.Equals(other._target));
 }