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)); }
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); }
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); }