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 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; |
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 IHelloWorldAsync | |
{ | |
Task<string> SayHelloAsync(string message); | |
} |
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 IHelloWorld | |
{ | |
string SayHello(string message); | |
} |
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
// 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 | |
{ |
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
[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); | |
} |
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 Government | |
{ | |
class America { } | |
class Citizen : America | |
{ | |
const string TaxReturns = "Release us FFS!!!"; | |
private int trumpEmotionalIQ = 0, trumpTolerance = 0; | |
private float trumpExperience = .03f; |
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; | |
namespace ClassLibrary1 | |
{ | |
public class ImplicitCastingBenchmarks | |
{ | |
readonly private IInterface<string> _sut = new Implementation(); | |
readonly private IInterface<object> _obj; | |
public ImplicitCastingBenchmarks() | |
{ |
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 System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using BenchmarkDotNet.Attributes; | |
namespace ClassLibrary1 | |
{ | |
public class CastingBenchmarks | |
{ | |
readonly private static Type Key = typeof(int); |