-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from SeferMirza/issue/stylecop-analyzers
Issue / Stylecop Analyzers
- Loading branch information
Showing
14 changed files
with
294 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/blueprints/Do.Blueprints.Service.Application/Configuration/Settings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 46 additions & 44 deletions
90
src/core/Do.Architecture/Branding/Banner.cs → ...core/Do.Architecture/Branding/DoBanner.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,46 @@ | ||
namespace Do.Branding; | ||
|
||
public sealed class DoBanner : IBanner | ||
{ | ||
public void Print() | ||
{ | ||
var assembly = GetType().Assembly; | ||
var version = assembly.GetName().Version ?? new(0, 0, 0); | ||
var ver = $"{version.Major}.{version.Minor}.{version.Build}"; | ||
|
||
var brand = ConsoleColor.DarkRed; | ||
var white = ConsoleColor.White; | ||
var foreground = ConsoleColor.Gray; | ||
var border = ConsoleColor.DarkGray; | ||
|
||
L("----------------------------------------------", border); | ||
L(); | ||
W(" "); W("██", brand); L(" ████████ ██████████", white); | ||
W(" "); W("██", brand); L(" ██ ██ ██ ██", white); | ||
W(" "); W("██", brand); L(" ██ ██ ██ ██", white); | ||
W(" "); W("██", brand); L(" ██ ██ ██ ██", white); | ||
W(" "); W("██", brand); W(" ████████ ██████████ ", white); L("██████████", brand); | ||
L(); | ||
L("------------------- v$VER$ -------------------".Replace("$VER$", ver), border); | ||
L(); | ||
L("Docs: https://do.mouseless.codes", foreground); | ||
L("Source: https://github.com/mouseless/do", foreground); | ||
L(); | ||
L("----------------------------------------------", border); | ||
} | ||
|
||
static void L(string? message = default, ConsoleColor? color = default) => W($"{message ?? string.Empty}{Environment.NewLine}", color); | ||
static void W(string message, ConsoleColor? color = default) | ||
{ | ||
color ??= Console.ForegroundColor; | ||
|
||
var old = Console.ForegroundColor; | ||
|
||
Console.ForegroundColor = color.Value; | ||
Console.Write(message); | ||
|
||
Console.ForegroundColor = old; | ||
} | ||
} | ||
namespace Do.Branding; | ||
|
||
public sealed class DoBanner : IBanner | ||
{ | ||
public void Print() | ||
{ | ||
var assembly = GetType().Assembly; | ||
var version = assembly.GetName().Version ?? new(0, 0, 0); | ||
var ver = $"{version.Major}.{version.Minor}.{version.Build}"; | ||
|
||
var brand = ConsoleColor.DarkRed; | ||
var white = ConsoleColor.White; | ||
var foreground = ConsoleColor.Gray; | ||
var border = ConsoleColor.DarkGray; | ||
|
||
L("----------------------------------------------", border); | ||
L(); | ||
W(" ").W("██", brand).L(" ████████ ██████████", white); | ||
W(" ").W("██", brand).L(" ██ ██ ██ ██", white); | ||
W(" ").W("██", brand).L(" ██ ██ ██ ██", white); | ||
W(" ").W("██", brand).L(" ██ ██ ██ ██", white); | ||
W(" ").W("██", brand).W(" ████████ ██████████ ", white).L("██████████", brand); | ||
L(); | ||
L("------------------- v$VER$ -------------------".Replace("$VER$", ver), border); | ||
L(); | ||
L("Docs: https://do.mouseless.codes", foreground); | ||
L("Source: https://github.com/mouseless/do", foreground); | ||
L(); | ||
L("----------------------------------------------", border); | ||
} | ||
|
||
DoBanner L(string? message = default, ConsoleColor? color = default) => W($"{message ?? string.Empty}{Environment.NewLine}", color); | ||
DoBanner W(string message, ConsoleColor? color = default) | ||
{ | ||
color ??= Console.ForegroundColor; | ||
|
||
var old = Console.ForegroundColor; | ||
|
||
Console.ForegroundColor = color.Value; | ||
Console.Write(message); | ||
|
||
Console.ForegroundColor = old; | ||
|
||
return this; | ||
} | ||
} |
Oops, something went wrong.