Skip to content

Instantly share code, notes, and snippets.


Mike-E Mike-E-angelo

View GitHub Profile
Mike-E-angelo / CSharpish.cs
Last active Jun 12, 2019
Razor C# Example
View CSharpish.cs
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.RenderTree;
namespace Presentation.Elements
public abstract class ElementBase : ComponentBase
readonly string _name;
protected ElementBase(string name) => _name = name;
View BasicAsynchronousInterface.cs
public interface IHelloWorldAsync
Task<string> SayHelloAsync(string message);
View BasicInterface.cs
public interface IHelloWorld
string SayHello(string message);
Mike-E-angelo / Empty
Last active Sep 8, 2018
Hashing out Empty
View Empty
// Re:
// Decompiled with JetBrains decompiler
// Type: System.Linq.Enumerable
// Assembly: System.Linq, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// MVID: 27FAC526-A042-4B73-AEC3-616A6586AC97
// Assembly location: c:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.3\System.Linq.dll
namespace System.Linq
Mike-E-angelo / MetricTonOfCode.cs
Created Apr 15, 2018
Xunit2 Demystify Support
View MetricTonOfCode.cs
[assembly: TestFramework("AssemblyName.Namespace.TestFramework", "AssemblyName")]
public sealed class TestFramework : XunitTestFramework
public TestFramework(IMessageSink messageSink) : base(messageSink) {}
protected override ITestFrameworkExecutor CreateExecutor(AssemblyName assemblyName)
=> new Executor(assemblyName, SourceInformationProvider, DiagnosticMessageSink);
View Murica.cs
namespace Government
class America { }
class Citizen : America
const string TaxReturns = "Release us FFS!!!";
private int trumpEmotionalIQ = 0, trumpTolerance = 0;
private float trumpExperience = .03f;
Mike-E-angelo / ImplicitCastingBenchmarks.cs
Created Apr 13, 2017
Basic benchmarks around implicit/explicit contra/covariant casting.
View ImplicitCastingBenchmarks.cs
using BenchmarkDotNet.Attributes;
namespace ClassLibrary1
public class ImplicitCastingBenchmarks
readonly private IInterface<string> _sut = new Implementation();
readonly private IInterface<object> _obj;
public ImplicitCastingBenchmarks()
Mike-E-angelo / CastingBenchmarks.cs
Created Apr 12, 2017
Basic benchmarks on casting, including with access from a dictionary.
View CastingBenchmarks.cs
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using BenchmarkDotNet.Attributes;
namespace ClassLibrary1
public class CastingBenchmarks
readonly private static Type Key = typeof(int);
You can’t perform that action at this time.