public bool Equals(ReadWithFormatter other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other._inputType, _inputType) && Equals(other._formatterType, _formatterType));
 }
Beispiel #2
0
        public ReadWithFormatter AddFormatter <T>() where T : IFormatter
        {
            var formatter = new ReadWithFormatter(_inputType, typeof(T));
            var existing  = Readers.FirstOrDefault(x => x.Equals(formatter)) as ReadWithFormatter;

            if (existing != null)
            {
                return(existing);
            }

            Readers.AddToEnd(formatter);

            return(formatter);
        }
Beispiel #3
0
 public bool Equals(ReadWithFormatter other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other._inputType, _inputType) && Equals(other._formatterType, _formatterType);
 }