public static KernelBuilder UseStatistic(this KernelBuilder builder, Action <StatisticBuilder> build)
        {
            var statisticBuilder = new StatisticBuilder(builder);

            build(statisticBuilder);
            return(builder);
        }
Exemplo n.º 2
0
 public static KernelBuilder UseEventBus(this KernelBuilder builder)
 {
     builder.Configure((context, container) =>
     {
         container.RegisterType <MemoryEventBus>().As <IEventBus>().SingleInstance();
     });
     return(builder);
 }
 public static KernelBuilder UseEFSqlite(this KernelBuilder kernelBuilder)
 {
     kernelBuilder.Configure((context, builder) =>
     {
         var dbFileName = context.Configuration.GetSection("Sqlite")["DbFileName"] ?? "ember.sqlite";
         builder.RegisterInstance(new SqliteConfiguration(Path.GetFullPath(dbFileName))).SingleInstance();
     });
     return(kernelBuilder);
 }
Exemplo n.º 4
0
 public static KernelBuilder UseCommandService(this KernelBuilder builder)
 {
     builder.UseKernelService <CommandService, ICommandService>();
     return(builder);
 }