当前位置: 首页>>代码示例>>C#>>正文


C# Configuration.UseDependency方法代码示例

本文整理汇总了C#中Configuration.UseDependency方法的典型用法代码示例。如果您正苦于以下问题:C# Configuration.UseDependency方法的具体用法?C# Configuration.UseDependency怎么用?C# Configuration.UseDependency使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Configuration的用法示例。


在下文中一共展示了Configuration.UseDependency方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConfigureScheduler

        protected override void ConfigureScheduler(Configuration configuration)
        {
            configuration.Container.Register<SqlCommandScheduler>(c =>
            {
                throw new NotSupportedException("SqlCommandScheduler (legacy) is disabled");
                return null;
            });

            configuration
                .UseDependency<GetClockName>(c => e => clockName)
                .UseSqlStorageForScheduledCommands();

            configuration
                .AddToCommandSchedulerPipeline<Order>(
                    schedule: async (scheduling, next) =>
                    {
                        using (Log.Enter(() => new { scheduling }))
                        {
                            await next(scheduling);
                        }
                    },
                    deliver: async (delivering, next) =>
                    {
                        using (Log.Enter(() => new { delivering }))
                        {
                            await next(delivering);
                        }
                    });
        }
开发者ID:gitter-badger,项目名称:Its.Cqrs,代码行数:29,代码来源:SqlCommandSchedulerTests_New.cs

示例2: Configure

        protected override void Configure(Configuration configuration)
        {
            clockName = Any.CamelCaseName();

            configuration
                .UseDependency<GetClockName>(c => e => clockName)
                .UseSqlEventStore(c => c.UseConnectionString(TestDatabases.EventStore.ConnectionString))
                .UseSqlStorageForScheduledCommands(c => c.UseConnectionString(TestDatabases.CommandScheduler.ConnectionString));
        }
开发者ID:charlesmccarthyirl,项目名称:Its.Cqrs,代码行数:9,代码来源:SqlCommandSchedulerIdempotencyTests.cs

示例3: Configure

        protected override void Configure(
            Configuration configuration,
            Action<IDisposable> onDispose)
        {
            eventStoreDbTest = new EventStoreDbTest();
            clockName = Any.CamelCaseName();

            configuration
                .UseDependency<GetClockName>(c => e => clockName)
                .UseSqlEventStore()
                .UseSqlStorageForScheduledCommands();
        }
开发者ID:PhillipPruett,项目名称:Its.Cqrs,代码行数:12,代码来源:SqlCommandSchedulerIdempotencyTests.cs

示例4: Configure

        protected override void Configure(Configuration configuration)
        {
            configuration.Container.Register<SqlCommandScheduler>(c =>
            {
                throw new NotSupportedException("SqlCommandScheduler (legacy) is disabled");
                return null;
            });

            configuration
                .UseDependency<GetClockName>(c => e => clockName)
                .UseSqlStorageForScheduledCommands()
                .TraceScheduledCommands();
        }
开发者ID:commonsensesoftware,项目名称:Its.Cqrs,代码行数:13,代码来源:SqlCommandSchedulerTests_Pipeline.cs

示例5: Configure

 protected override void Configure(Configuration configuration) =>
     configuration
         .UseDependency<GetClockName>(c => e => clockName)
         .UseSqlStorageForScheduledCommands()
         .TraceScheduledCommands();
开发者ID:PhillipPruett,项目名称:Its.Cqrs,代码行数:5,代码来源:SqlCommandSchedulerTests_EventSourced.cs

示例6: Configure

 protected override void Configure(Configuration configuration) =>
     configuration
         .UseDependency<GetClockName>(c => e => clockName)
         .UseSqlStorageForScheduledCommands(c => c.UseConnectionString(TestDatabases.CommandScheduler.ConnectionString))
         .TraceScheduledCommands();
开发者ID:charlesmccarthyirl,项目名称:Its.Cqrs,代码行数:5,代码来源:SqlCommandSchedulerTests_EventSourced.cs


注:本文中的Configuration.UseDependency方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。