Exemplo n.º 1
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));
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }