Prepare solution
ADD
.editorconfig
+root = true
+charset = utf-8
+
+[*.cs]
+indent_style = tab
+indent_size = 4
+tab_size = 4
+
+dotnet_style_qualification_for_field = false : warning
+dotnet_style_qualification_for_property = false : warning
+dotnet_style_qualification_for_method = false : warning
+dotnet_style_qualification_for_event = false : warning
+
+dotnet_style_predefined_type_for_locals_parameters_members = true : warning
+dotnet_style_predefined_type_for_member_access = true : warning
+
+dotnet_style_object_initializer = false : warning
+dotnet_style_collection_initializer = true : warning
+dotnet_style_explicit_tuple_names = true : warning
+
+csharp_style_inlined_variable_declaration = true : warning
+
+csharp_prefer_simple_default_expression = true : warning
+
+dotnet_sort_system_directives_first = true : warning
+
+csharp_indent_case_contents = true : warning
+csharp_indent_switch_labels = true : warning
+
+csharp_space_between_method_declaration_parameter_list_parentheses = false : warning
+csharp_space_between_method_call_parameter_list_parentheses = false : warning
+
+csharp_preserve_single_line_blocks = true : warning
+
+# name all constant fields using PascalCase
+dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
+dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
+
+dotnet_naming_symbols.constant_fields.applicable_kinds = field
+dotnet_naming_symbols.constant_fields.required_modifiers = const
+
+dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+
+# name all static fields using PascalCase
+dotnet_naming_rule.static_fields_should_be_pascal_case.severity = warning
+dotnet_naming_rule.static_fields_should_be_pascal_case.symbols = static_fields
+dotnet_naming_rule.static_fields_should_be_pascal_case.style = pascal_case_style
+
+dotnet_naming_symbols.static_fields.applicable_kinds = field
+dotnet_naming_symbols.static_fields.required_modifiers = static
+
+# name all readonly fields using PascalCase
+dotnet_naming_rule.readonly_fields_should_be_pascal_case.severity = warning
+dotnet_naming_rule.readonly_fields_should_be_pascal_case.symbols = readonly_fields
+dotnet_naming_rule.readonly_fields_should_be_pascal_case.style = pascal_case_style
+
+dotnet_naming_symbols.readonly_fields.applicable_kinds = field
+dotnet_naming_symbols.readonly_fields.required_modifiers = readonly
+
+# internal and private fields should be _camelCase
+dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning
+dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
+dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
+
+dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
+dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal, protected
+
+dotnet_naming_style.camel_case_underscore_style.required_prefix = _
+dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
+
+# Async suffix
+dotnet_naming_rule.async_methods_end_with_async.symbols = any_async_methods
+dotnet_naming_rule.async_methods_end_with_async.style = end_with_async
+dotnet_naming_rule.async_methods_end_with_async.severity = warning
+dotnet_naming_symbols.any_async_methods.applicable_kinds = method
+dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
+dotnet_naming_symbols.any_async_methods.required_modifiers = async
+dotnet_naming_style.end_with_async.required_suffix = Async
+dotnet_naming_style.end_with_async.capitalization = pascal_case
\ No newline at end of file

MODIFY
MagicalCryptoWallet.Backend/MagicalCryptoWallet.Backend.csproj
MagicalCryptoWallet.Backend/MagicalCryptoWallet.Backend.csproj
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\MagicalCryptoWallet\MagicalCryptoWallet.csproj" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <LangVersion>latest</LangVersion>
+ </PropertyGroup>
+
</Project>

MODIFY
MagicalCryptoWallet.Backend/Program.cs
MagicalCryptoWallet.Backend/Program.cs
@@ -12,9 +12,11 @@ namespace MagicalCryptoWallet.Backend
{
public class Program
{
- public static void Main(string[] args)
+#pragma warning disable IDE1006 // Naming Styles
+ public static async Task Main(string[] args)
+#pragma warning restore IDE1006 // Naming Styles
{
- BuildWebHost(args).Run();
+ await BuildWebHost(args).RunAsync();
}
public static IWebHost BuildWebHost(string[] args) =>

ADD
MagicalCryptoWallet.Tests/MagicalCryptoWallet.Tests.csproj
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+
+ <IsPackable>false</IsPackable>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
+ <PackageReference Include="xunit" Version="2.3.1" />
+ <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
+ <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\MagicalCryptoWallet.Backend\MagicalCryptoWallet.Backend.csproj" />
+ <ProjectReference Include="..\MagicalCryptoWallet\MagicalCryptoWallet.csproj" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <LangVersion>latest</LangVersion>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <None Update="xunit.runner.json">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
+
+</Project>

ADD
MagicalCryptoWallet.Tests/UnitTest1.cs
+using System;
+using Xunit;
+
+namespace MagicalCryptoWallet.Tests
+{
+ public class UnitTest1
+ {
+ [Fact]
+ public void Test1()
+ {
+
+ }
+ }
+}

MODIFY
MagicalCryptoWallet.sln
MagicalCryptoWallet.sln
@@ -5,6 +5,15 @@ VisualStudioVersion = 15.0.27130.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicalCryptoWallet.Backend", "MagicalCryptoWallet.Backend\MagicalCryptoWallet.Backend.csproj", "{A378E063-1660-472F-9CB2-0A3E96A56A63}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicalCryptoWallet.Tests", "MagicalCryptoWallet.Tests\MagicalCryptoWallet.Tests.csproj", "{50BDFA09-7575-4EEE-B733-D41B65B06D00}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicalCryptoWallet", "MagicalCryptoWallet\MagicalCryptoWallet.csproj", "{526AC796-6CC0-4ADA-9A7E-C12267719A1A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6611C6DA-01B6-4C7D-ACD9-F212DD5D66BD}"
+ ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +24,14 @@ Global
{A378E063-1660-472F-9CB2-0A3E96A56A63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A378E063-1660-472F-9CB2-0A3E96A56A63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A378E063-1660-472F-9CB2-0A3E96A56A63}.Release|Any CPU.Build.0 = Release|Any CPU
+ {50BDFA09-7575-4EEE-B733-D41B65B06D00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {50BDFA09-7575-4EEE-B733-D41B65B06D00}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {50BDFA09-7575-4EEE-B733-D41B65B06D00}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {50BDFA09-7575-4EEE-B733-D41B65B06D00}.Release|Any CPU.Build.0 = Release|Any CPU
+ {526AC796-6CC0-4ADA-9A7E-C12267719A1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {526AC796-6CC0-4ADA-9A7E-C12267719A1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {526AC796-6CC0-4ADA-9A7E-C12267719A1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {526AC796-6CC0-4ADA-9A7E-C12267719A1A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

ADD
MagicalCryptoWallet/MagicalCryptoWallet.csproj
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <LangVersion>latest</LangVersion>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="NBitcoin" Version="4.0.0.54" />
+ <PackageReference Include="Nito.AsyncEx.Coordination" Version="1.0.2" />
+ </ItemGroup>
+
+</Project>

Prepare solution