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
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
BenchmarkRunner.Run<Benchmark>(); | |
[MemoryDiagnoser] | |
public class Benchmark | |
{ | |
private static int Executor(Func<int> a) => a(); |
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
// See https://github.com/gregsdennis/json-everything/issues/8 | |
public class JsonSchemaLoader | |
{ | |
private static JsonSchema Load(string schemaFile, ValidationOptions options) | |
{ | |
var schemaFullPath = Path.GetFullPath(schemaFile); | |
var schemaUri = new Uri(schemaFullPath); | |
var json = File.ReadAllText(schemaFile); | |
return Load(schemaUri, json, options); |
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>netcoreapp3.0</TargetFramework> | |
<IsPackable>false</IsPackable> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.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
namespace CodeBehindTest.Pages | |
{ | |
public partial class Counter | |
{ | |
private int currentCount = 0; | |
private void IncrementCount() | |
{ | |
currentCount++; | |
} |
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 DefaultTargets="Default"> | |
<ItemGroup> | |
<Items Include="One;Two;Three;Four;Five" /> | |
</ItemGroup> | |
<Target Name="Default"> | |
<ItemGroup> | |
<Reversed Include="@(Items->Reverse())" /> | |
</ItemGroup> |