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); | |
} |
View Empty
// Re: https://medium.com/@antao.almada/enumeration-in-net-iii-enumerable-empty-t-1bfcd53739a7 | |
// Decompiled with JetBrains decompiler | |
// Type: System.Linq.Enumerable | |
// Assembly: System.Linq, Version=4.2.1.0, 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 | |
{ |
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; |
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() | |
{ |
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); |