本文整理汇总了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
}
示例2: SimplePolicy
public SimplePolicy()
{
BusConfiguration busConfiguration = new BusConfiguration();
#region SecondLevelRetriesCustomPolicy
SecondLevelRetriesSettings retriesSettings = busConfiguration.SecondLevelRetries();
retriesSettings.CustomRetryPolicy(MyCustomRetryPolicy);
#endregion
}
示例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"));
}
示例4: Simple
public void Simple()
{
var configuration = new BusConfiguration();
#region SecondLevelRetriesDisableV5
configuration.DisableFeature<SecondLevelRetries>();
#endregion
#region SecondLevelRetriesCustomPolicyV5
configuration.SecondLevelRetries().CustomRetryPolicy(MyCustomRetryPolicy);
#endregion
}
示例5: Usage
public Usage()
{
BusConfiguration busConfiguration = new BusConfiguration();
#region SecondLevelRetriesDisable
busConfiguration.DisableFeature<SecondLevelRetries>();
#endregion
#region SecondLevelRetriesCustomPolicy
SecondLevelRetriesSettings retriesSettings = busConfiguration.SecondLevelRetries();
retriesSettings.CustomRetryPolicy(MyCustomRetryPolicy);
#endregion
}
示例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());
}
}
}