Skip to content

Commit

Permalink
add - brk|doc - Added debugger display to all classes
Browse files Browse the repository at this point in the history
---

We've added debugger view to all the classes. Meanwhile, we've replaced all the List<>'s along the way to make the variables more secure.

---

Type: add
Breaking: True
Doc Required: True
Part: 1/1
  • Loading branch information
AptiviCEO committed Apr 9, 2024
1 parent 4c44e0a commit 04f65ce
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 24 deletions.
8 changes: 7 additions & 1 deletion Nettify/EnglishDictionary/DictionaryWord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@
//

using Newtonsoft.Json;
using System.Diagnostics;

namespace Nettify.EnglishDictionary
{
/// <summary>
/// A dictionary word
/// </summary>
[DebuggerDisplay("{Word} {PhoneticWord}: {Meanings.Length} meanings")]
public partial class DictionaryWord
{
/// <summary>
/// The definition class
/// </summary>
[DebuggerDisplay("{Definition}: {Synonyms.Length} synonyms, {Antonyms.Length} antonyms")]
public partial class DefinitionType
{
/// <summary>
Expand Down Expand Up @@ -59,6 +62,7 @@ public partial class DefinitionType
/// <summary>
/// The license class
/// </summary>
[DebuggerDisplay("{Name}: {Url}")]
public partial class License
{
/// <summary>
Expand All @@ -77,6 +81,7 @@ public partial class License
/// <summary>
/// Word meaning class
/// </summary>
[DebuggerDisplay("{PartOfSpeech}: {Definitions.Count} definitions, {Synonyms.Length} synonyms, {Antonyms.Length} antonyms")]
public partial class Meaning
{
/// <summary>
Expand Down Expand Up @@ -107,6 +112,7 @@ public partial class Meaning
/// <summary>
/// Phonetic class
/// </summary>
[DebuggerDisplay("{Text}: {Audio}")]
public partial class Phonetic
{
/// <summary>
Expand All @@ -116,7 +122,7 @@ public partial class Phonetic
public string Text { get; set; }

/// <summary>
/// Link to the pronounciation, usually in MP3 format. Use NAudio (Windows) to play it.
/// Link to the pronounciation, usually in MP3 format. Use BassBoom to play it after downloading it.
/// </summary>
[JsonProperty("audio")]
public string Audio { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/Documentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// Documentation information
/// </summary>
[XmlRoot(ElementName = "documentation")]
[DebuggerDisplay("{Description}: {Url}")]
public class Documentation
{
/// <summary>
Expand Down
9 changes: 5 additions & 4 deletions Nettify/MailAddress/IspInfo/EmailProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Collections.Generic;
using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -27,13 +27,14 @@ namespace Nettify.MailAddress.IspInfo
/// The E-mail provider (ISP) information
/// </summary>
[XmlRoot(ElementName = "emailProvider")]
[DebuggerDisplay("{DisplayName}: {Domain.Length} domains with {DominatingDomain} as dominating domain")]
public class EmailProvider
{
/// <summary>
/// The list of domains
/// </summary>
[XmlElement(ElementName = "domain")]
public List<string> Domain { get; set; }
public string[] Domain { get; set; }

/// <summary>
/// The full name for the ISP mail server
Expand All @@ -51,7 +52,7 @@ public class EmailProvider
/// List of incoming servers
/// </summary>
[XmlElement(ElementName = "incomingServer")]
public List<IncomingServer> IncomingServer { get; set; }
public IncomingServer[] IncomingServer { get; set; }

/// <summary>
/// Outgoing server
Expand All @@ -63,7 +64,7 @@ public class EmailProvider
/// Documentation information
/// </summary>
[XmlElement(ElementName = "documentation")]
public List<Documentation> Documentation { get; set; }
public Documentation[] Documentation { get; set; }

/// <summary>
/// The dominating domain
Expand Down
4 changes: 3 additions & 1 deletion Nettify/MailAddress/IspInfo/Enable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The log-in server enablement instructions
/// </summary>
[XmlRoot(ElementName = "enable")]
[DebuggerDisplay("{Instruction}: {VisitUrl}")]
public class Enable
{
/// <summary>
Expand All @@ -38,7 +40,7 @@ public class Enable
/// The URL to visit to enable login
/// </summary>
[XmlAttribute(AttributeName = "visiturl")]
public string Visiturl { get; set; }
public string VisitUrl { get; set; }
}

}
5 changes: 3 additions & 2 deletions Nettify/MailAddress/IspInfo/IncomingServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Collections.Generic;
using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -27,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The incoming server information (POP3 or IMAP)
/// </summary>
[XmlRoot(ElementName = "incomingServer")]
[DebuggerDisplay("{Hostname,nq}:{Port}, {Type}, {Username}")]
public class IncomingServer
{
/// <summary>
Expand Down Expand Up @@ -57,7 +58,7 @@ public class IncomingServer
/// The authentication methods
/// </summary>
[XmlElement(ElementName = "authentication")]
public List<string> Authentication { get; set; }
public string[] Authentication { get; set; }

/// <summary>
/// The server type. Usually "imap" or "pop3"
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/LoginButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The log-in button information
/// </summary>
[XmlRoot(ElementName = "loginButton")]
[DebuggerDisplay("Element ID: {Id}")]
public class LoginButton
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/LoginPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The webmail login page
/// </summary>
[XmlRoot(ElementName = "loginPage")]
[DebuggerDisplay("Webmail: {Url}")]
public class LoginPage
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/LoginPageInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The login page information for the ISP's webmail
/// </summary>
[XmlRoot(ElementName = "loginPageInfo")]
[DebuggerDisplay("{Username}: {Url}")]
public class LoginPageInfo
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/OAuth2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The OAuth2 information for the ISP's mail server
/// </summary>
[XmlRoot(ElementName = "oAuth2")]
[DebuggerDisplay("{Issuer}|{Scope}: {AuthURL}, {TokenURL}")]
public class OAuth2
{
/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions Nettify/MailAddress/IspInfo/OutgoingServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Collections.Generic;
using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -27,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The outgoing server information (SMTP)
/// </summary>
[XmlRoot(ElementName = "outgoingServer")]
[DebuggerDisplay("{Hostname,nq}:{Port}, {SocketType}, {Username}")]
public class OutgoingServer
{
/// <summary>
Expand Down Expand Up @@ -57,7 +58,7 @@ public class OutgoingServer
/// The authentication methods
/// </summary>
[XmlElement(ElementName = "authentication")]
public List<string> AuthenticationMethods { get; set; }
public string[] AuthenticationMethods { get; set; }

/// <summary>
/// The server type. Usually "smtp"
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/PasswordField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The password field information
/// </summary>
[XmlRoot(ElementName = "passwordField")]
[DebuggerDisplay("Password Element: {Id}")]
public class PasswordField
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/Pop3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// POP3 server properties
/// </summary>
[XmlRoot(ElementName = "pop3")]
[DebuggerDisplay("POP3 settings: LeaveMessagesOnServer = {LeaveMessagesOnServer}")]
public class Pop3
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/UsernameField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The username field for the webmail
/// </summary>
[XmlRoot(ElementName = "usernameField")]
[DebuggerDisplay("Username Element: {Id}")]
public class UsernameField
{
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Nettify/MailAddress/IspInfo/WebMail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

using System.Diagnostics;
using System.Xml.Serialization;

namespace Nettify.MailAddress.IspInfo
Expand All @@ -26,6 +27,7 @@ namespace Nettify.MailAddress.IspInfo
/// The webmail configuration
/// </summary>
[XmlRoot(ElementName = "webMail")]
[DebuggerDisplay("Webmail information is{(LoginPageInfo is not null ? \"\" : \" not\"),nq} available")]
public class WebMail
{
/// <summary>
Expand Down
Loading

0 comments on commit 04f65ce

Please sign in to comment.