- StructureMap.Dnx
- Autofac.Extensions.DependencyInjection
- DryIoc.AspNetCore.DependencyInjection
- Grace.DependencyInjection.Extensions
- LightInject.Microsoft.DependencyInjection
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; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
[DebuggerTypeProxy(typeof(CircularBuffer<>.DebugView))] | |
[DebuggerDisplay("Count = {Count}, Type = {Collection}")] | |
public class CircularBuffer<T> : IReadOnlyCollection<T>, ICollection | |
{ |
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 static System.Text.Encoding; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Diagnostics.Windows; | |
using BenchmarkDotNet.Running; | |
using Xunit; | |
public static class Program | |
{ |
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
[Route("customers")] | |
public class CustomerController | |
{ | |
public CustomerController(DbContext context) | |
{ | |
Context = context; | |
} | |
private DbContext Context { get; } |
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 MyAwesomeStartup : Startup<IContainer> | |
{ | |
public MyAwesomeStartup(IServiceProviderFactory factory) : base(factory) | |
{ | |
} | |
protected override void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddMvc(); | |
} |
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.Reflection; | |
public static class Program | |
{ | |
public static void Main() | |
{ | |
var test = new T(); | |
var testType = test.GetType(); |
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 Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.DependencyInjection.Extensions; | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var services = new ServiceCollection(); |
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 Startup : IStartup | |
{ | |
private static readonly Assembly[] ControllerAssemblies = { typeof(Startup).GetTypeInfo().Assembly }; | |
public Startup(IHostingEnvironment environment, ILoggerFactory logging) | |
{ | |
Environment = environment; | |
ConfigureLogging(logging); | |
} |
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.Linq; | |
using System.Threading.Tasks; | |
public delegate Task AppFunc(IDictionary<string, object> env); | |
public delegate AppFunc MidFunc(AppFunc next); | |
public delegate MidFunc MidFactoryFunc(IDictionary<string, object> props); |
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 class Program | |
{ | |
private static readonly AssemblyName CurrentAssemblyName = typeof(Program).Assembly.GetName(); | |
public static void Main() | |
{ | |
var mainDomain = AppDomain.CurrentDomain; | |
var assemblyFolders = mainDomain.GetAssemblyFolders(); |