예제 #1
0
            protected override ValueTrashable FromExternalValueToInternalValue(Tuple <int, int> externalValue)
            {
                ValueTrashable res;

                if (!Values.TryGetValue(externalValue, out res))
                {
                    Values[externalValue] = res = new ValueTrashable {
                        Value = externalValue
                    }
                }
                ;

                return(res);
            }
        }
예제 #2
0
 public bool Equals(ValueTrashable other)
 {
     return(other != null && (IsGarbage || other.IsGarbage ? object.ReferenceEquals(this, other) : Value.Item1 == other.Value.Item1));
 }