akamsteeg / AtleX.HaveIBeenPwned

A fully async .NET Standard client library for the API of HaveIBeenPwned.com
https://www.nuget.org/packages/AtleX.HaveIBeenPwned/
MIT License
5 stars 0 forks source link

Override ToString() on Breach and Paste to display the Name or Title #41

Closed akamsteeg closed 4 years ago

akamsteeg commented 4 years ago

(Inspired by #40)

When calling ToString() on Breach or Paste, the type name is returned because these methods aren't overridden. If we override ToString() we can return actually useful information, like in the DebuggerDisplayAttribute on those classes.

Suggestion:

  1. Override ToString() on Breach and return the value of the Name property;
  2. Override ToString() on Paste and return the value of the Title property.