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


C# BusConfiguration.SecondLevelRetries方法代码示例

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


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

示例1: SimplePolicy

        SimplePolicy(BusConfiguration busConfiguration)
        {
            #region SecondLevelRetriesCustomPolicy

            var retriesSettings = busConfiguration.SecondLevelRetries();
            retriesSettings.CustomRetryPolicy(MyCustomRetryPolicy);

            #endregion
        }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:9,代码来源:SimplePolicy.cs

示例2: SimplePolicy

        public SimplePolicy()
        {
            BusConfiguration busConfiguration = new BusConfiguration();
            #region SecondLevelRetriesCustomPolicy

            SecondLevelRetriesSettings retriesSettings = busConfiguration.SecondLevelRetries();
            retriesSettings.CustomRetryPolicy(MyCustomRetryPolicy);

            #endregion
        }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:10,代码来源:SimplePolicy.cs

示例3: Customize

        public void Customize(BusConfiguration configuration)
        {
            configuration.EndpointName(GetType().Namespace);
              configuration.UseTransport<MsmqTransport>();
              configuration.UsePersistence<InMemoryPersistence>();
              configuration.EnableInstallers();
              configuration.UseSerialization<JsonSerializer>();

              configuration.SecondLevelRetries().CustomRetryPolicy(CustomRetryPolicy);

              configuration.Conventions()
                   .DefiningMessagesAs(t => t.Namespace != null && t.Namespace.EndsWith(".Messages"))
                   .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.EndsWith(".Commands"))
                   .DefiningEventsAs(t => t.Namespace != null && t.Namespace.EndsWith(".Events"));
        }
开发者ID:rioka,项目名称:NsbCustomRetryPolicy,代码行数:15,代码来源:EndpointConfig.cs

示例4: Simple

    public void Simple()
    {

        var configuration = new BusConfiguration();

        #region SecondLevelRetriesDisableV5

        configuration.DisableFeature<SecondLevelRetries>();

        #endregion

        #region SecondLevelRetriesCustomPolicyV5

        configuration.SecondLevelRetries().CustomRetryPolicy(MyCustomRetryPolicy);

        #endregion
    }
开发者ID:KrzysztofKielce,项目名称:docs.particular.net,代码行数:17,代码来源:SecondLevelRetriesConfig.cs

示例5: Usage

        public Usage()
        {

            BusConfiguration busConfiguration = new BusConfiguration();

            #region SecondLevelRetriesDisable

            busConfiguration.DisableFeature<SecondLevelRetries>();

            #endregion

            #region SecondLevelRetriesCustomPolicy

            SecondLevelRetriesSettings retriesSettings = busConfiguration.SecondLevelRetries();
            retriesSettings.CustomRetryPolicy(MyCustomRetryPolicy);

            #endregion
        }
开发者ID:RichieYang,项目名称:docs.particular.net,代码行数:18,代码来源:Usage.cs

示例6: Main

        static void Main(string[] args)
        {
            LogManager.Use<DefaultFactory>().Level(LogLevel.Info);
            BusConfiguration busConfiguration = new BusConfiguration();
            busConfiguration.EndpointName("TestCustomPolicy");
            busConfiguration.UseSerialization<JsonSerializer>();
            busConfiguration.UsePersistence<InMemoryPersistence>();

            busConfiguration.SecondLevelRetries().CustomRetryPolicy(new NServiceBusSecondLevelHandling().RetryPolicy);

            using (IBus bus = Bus.Create(busConfiguration).Start())
            {
                while (Console.ReadLine() != null)
                {
                    bus.SendLocal(new DoSomething());
                }
            }
        }
开发者ID:BobAtParticular,项目名称:NSB.Issue3443,代码行数:18,代码来源:Program.cs


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