BenchmarkDotNet=v0.11.4, OS=macOS Mojave 10.14.4 (18E226) [Darwin 18.5.0]
Intel Core i5-7360U CPU 2.30GHz (Kaby Lake), 1 CPU, 4 logical and 2 physical cores
.NET Core SDK=3.0.100-preview4-011223
[Host] : .NET Core 2.1.6 (CoreCLR 4.6.27019.06, CoreFX 4.6.27019.05), 64bit RyuJIT
DefaultJob : .NET Core 2.1.6 (CoreCLR 4.6.27019.06, CoreFX 4.6.27019.05), 64bit RyuJIT
This file contains hidden or 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
<ItemGroup> | |
<Compile Update="TestData\**\*.cs"> | |
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
</Compile> | |
</ItemGroup> |
This file contains hidden or 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 AssignmentBoxingTests : DiagnosticVerifier | |
{ | |
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() => | |
new AssignmentBoxingAnalyzer(); | |
[Theory] | |
[InlineData("TestData/HLQ001/NoDiagnostic/FieldDeclaration.cs")] | |
[InlineData("TestData/HLQ001/NoDiagnostic/FieldDeclaration.Async.cs")] | |
[InlineData("TestData/HLQ001/NoDiagnostic/PropertyDeclaration.cs")] | |
[InlineData("TestData/HLQ001/NoDiagnostic/PropertyDeclaration.Async.cs")] |
This file contains hidden or 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
[TestMethod] | |
public void TestMethod2() | |
{ | |
var test = @" | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; |
This file contains hidden or 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 System; | |
using System.Diagnostics.Contracts; | |
namespace NetFabric.Hyperlinq | |
{ | |
public static class Result | |
{ | |
[Pure] | |
public static DelayedOk<TOk> Ok<TOk>(TOk ok) | |
=> new DelayedOk<TOk>(ok); |
This file contains hidden or 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 System; | |
using System.Diagnostics.Contracts; | |
namespace NetFabric.Hyperlinq | |
{ | |
public static class Option | |
{ | |
[Pure] | |
public static NoneOption None { get; } = new NoneOption(); |
This file contains hidden or 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 System; | |
using System.Collections.Generic; | |
using System.Collections.Immutable; | |
using System.Linq; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace HeadTail | |
{ | |
[MemoryDiagnoser] |
This file contains hidden or 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 UnityEngine; | |
/// <summary> | |
/// Inherit from this base class to create a singleton. | |
/// e.g. public class MyClassName : Singleton<MyClassName> {} | |
/// </summary> | |
public abstract class Singleton<T> : MonoBehaviour where T : MonoBehaviour | |
{ | |
// Check to see if we're about to be destroyed. | |
static bool shuttingDown = false; |
This file contains hidden or 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.Configs; | |
using System; | |
namespace Benchmarks | |
{ | |
[MemoryDiagnoser] | |
[MarkdownExporterAttribute.GitHub] | |
public class ValueEnumerableBenchmarks2 | |
{ |
This file contains hidden or 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 static partial class TypeExtensions | |
{ | |
public static string GetFriendlyName(this Type type) | |
{ | |
if (!type.IsGenericType) | |
return type.FullName; | |
var name = type.FullName.Substring(0, type.FullName.IndexOf('`')); | |
var fullName = new StringBuilder(name); | |
fullName.Append("<"); |