From 278c807fa3c714395d8ca0011c03366106ba7064 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sun, 25 Feb 2024 14:11:33 +0000 Subject: [PATCH] style: apply braces style to project --- OliverBooth/Data/Web/BlacklistEntry.cs | 12 +++- OliverBooth/Data/Web/ProgrammingLanguage.cs | 12 +++- OliverBooth/Data/Web/Project.cs | 12 +++- OliverBooth/Data/Web/SiteConfiguration.cs | 12 +++- OliverBooth/Data/Web/Template.cs | 12 +++- OliverBooth/Data/Web/User.cs | 10 +++- OliverBooth/Formatting/DateFormatter.cs | 4 ++ OliverBooth/Formatting/MarkdownFormatter.cs | 2 + .../Timestamp/TimestampInlineParser.cs | 6 +- OliverBooth/Pages/Blog/RawArticle.cshtml.cs | 2 + OliverBooth/Services/SessionService.cs | 56 +++++++++++++++---- OliverBooth/Services/TemplateService.cs | 5 +- OliverBooth/Services/UserService.cs | 11 +++- 13 files changed, 128 insertions(+), 28 deletions(-) diff --git a/OliverBooth/Data/Web/BlacklistEntry.cs b/OliverBooth/Data/Web/BlacklistEntry.cs index 374d9c2..2141557 100644 --- a/OliverBooth/Data/Web/BlacklistEntry.cs +++ b/OliverBooth/Data/Web/BlacklistEntry.cs @@ -45,8 +45,16 @@ internal sealed class BlacklistEntry : IEquatable, IBlacklistEnt /// public bool Equals(BlacklistEntry? other) { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + return EmailAddress.Equals(other.EmailAddress); } diff --git a/OliverBooth/Data/Web/ProgrammingLanguage.cs b/OliverBooth/Data/Web/ProgrammingLanguage.cs index 53746d9..1c4de45 100644 --- a/OliverBooth/Data/Web/ProgrammingLanguage.cs +++ b/OliverBooth/Data/Web/ProgrammingLanguage.cs @@ -42,8 +42,16 @@ internal sealed class ProgrammingLanguage : IEquatable, IPr /// public bool Equals(ProgrammingLanguage? other) { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + return Key.Equals(other.Key); } diff --git a/OliverBooth/Data/Web/Project.cs b/OliverBooth/Data/Web/Project.cs index 05761a7..32868de 100644 --- a/OliverBooth/Data/Web/Project.cs +++ b/OliverBooth/Data/Web/Project.cs @@ -74,8 +74,16 @@ internal sealed class Project : IEquatable, IProject /// public bool Equals(Project? other) { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + return Id.Equals(other.Id); } diff --git a/OliverBooth/Data/Web/SiteConfiguration.cs b/OliverBooth/Data/Web/SiteConfiguration.cs index b118f75..1bba964 100644 --- a/OliverBooth/Data/Web/SiteConfiguration.cs +++ b/OliverBooth/Data/Web/SiteConfiguration.cs @@ -50,8 +50,16 @@ public sealed class SiteConfiguration : IEquatable /// public bool Equals(SiteConfiguration? other) { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + return Key == other.Key; } diff --git a/OliverBooth/Data/Web/Template.cs b/OliverBooth/Data/Web/Template.cs index cf029a1..0ef5d90 100644 --- a/OliverBooth/Data/Web/Template.cs +++ b/OliverBooth/Data/Web/Template.cs @@ -47,8 +47,16 @@ public sealed class Template : ITemplate, IEquatable