Exemplo n.º 1
0
 private static bool EqualsExtracted(NeedleLock <T> left, NeedleLock <T> right)
 {
     if (left == null)
     {
         return(right == null);
     }
     return(left._target.Equals(right._target));
 }
Exemplo n.º 2
0
 public bool Equals(NeedleLock <T> other)
 {
     if (other is null)
     {
         return(false);
     }
     return(_target.Equals(other._target));
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 5
0
 public bool Equals(NeedleLock <T> other)
 {
     return(EqualsExtracted(this, other));
 }
Exemplo n.º 6
0
 public bool Equals(NeedleLock <T> other)
 {
     return(!(other is null) && _target.Equals(other._target));
 }