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
/// <summary> | |
/// Represents a blimey! | |
/// </summary> | |
/// <param name="Scoot"><inheritdoc cref="Scoot"/></param> | |
/// <param name="IsNeat"><inheritdoc cref="IsNeat"/></param> | |
public record Blimey(int Scoot, bool IsNeat) | |
{ | |
/// <summary> | |
/// The scoot | |
/// </summary> |
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
public interface IDbConnectionFactory | |
{ | |
IDbConnection Get(string connectionString); | |
} |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.1</TargetFramework> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" /> |
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
<Project> | |
<PropertyGroup> | |
<NuGet-Kritner-SolarProjection>1.0.2</NuGet-Kritner-SolarProjection> | |
</PropertyGroup> | |
</Project> |
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
public class Program | |
{ | |
public static int Main(string[] args) | |
{ | |
return RunMainAsync().Result; | |
} | |
private static async Task<int> RunMainAsync() | |
{ | |
try |
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
public class Program | |
{ | |
const int initializeAttemptsBeforeFailing = 5; | |
private static int attempt = 0; | |
static int Main(string[] args) | |
{ | |
return RunMainAsync().Result; | |
} |
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
[Route("api/[controller]")] | |
[ApiController] | |
public class SolarProjectionController : ControllerBase | |
{ | |
private readonly IProjectFutureEnergyCostService _service; | |
public SolarProjectionController(IProjectFutureEnergyCostService service) | |
{ | |
_service = service; | |
} |
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
// Haven't figured out how to apply to assembly correctly, but added it as a flag in my base anyway | |
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] | |
public class BaseCategoryAttribute : CategoryAttribute { } | |
public class FastIntegrationTestAttribute : BaseCategoryAttribute { } | |
public class LongRunningIntegrationTestAttribute : BaseCategoryAttribute { } | |
public class UnitTestAttribute : BaseCategoryAttribute { } | |
public class CoreTestAttribute : BaseCategoryAttribute { } | |
[TestFixture, UnitTest, CoreTest] |
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
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
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
public class Test | |
{ | |
public int Id {get;set;} | |
[JsonIgnore] public Foo {get;set;} = new Foo(); | |
public BigInteger Bar | |
{ | |
get => Foo.Bar; | |
set => Foo.Bar = value; | |
} |
NewerOlder