本文整理汇总了C#中Configure.UnicastBus方法的典型用法代码示例。如果您正苦于以下问题:C# Configure.UnicastBus方法的具体用法?C# Configure.UnicastBus怎么用?C# Configure.UnicastBus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configure
的用法示例。
在下文中一共展示了Configure.UnicastBus方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenamePrincipalHack
void RenamePrincipalHack(Configure configure)
{
#region 3to4RenamePrincipalHack
var unicastBus = configure.UnicastBus();
unicastBus.RunHandlersUnderIncomingPrincipal(true);
#endregion
}
示例2: RenamePrincipalHack
void RenamePrincipalHack(Configure configure)
{
#region 3to4RenamePrincipalHack
ConfigUnicastBus unicastBus = configure.UnicastBus();
unicastBus.ImpersonateSender(true);
#endregion
}
示例3: Simple
void Simple(Configure configure)
{
#region HandlerOrderingWithCode
var configUnicastBus = configure.UnicastBus();
configUnicastBus.LoadMessageHandlers(First<HandlerB>.Then<HandlerA>().AndThen<HandlerC>());
#endregion
}
示例4: ForInstallationOn
ForInstallationOn(Configure configure)
{
#region Installers
ConfigUnicastBus configUnicastBus = configure.UnicastBus();
IStartableBus startableBus = configUnicastBus.CreateBus();
startableBus.Start(() => Configure.Instance.ForInstallationOn<Windows>().Install());
#endregion
}
示例5: StaticHeaders
StaticHeaders(Configure configure)
{
#region header-static-endpoint
using (IStartableBus startableBus = configure.UnicastBus().CreateBus())
{
startableBus.OutgoingHeaders.Add("AllOutgoing", "ValueAllOutgoing");
#endregion
}
}
示例6: PublishAtStartup
PublishAtStartup(Configure configure)
{
#region publishAtStartup
using (IStartableBus startableBus = configure.UnicastBus().CreateBus())
{
IBus bus = startableBus.Start(() => configure.ForInstallationOn<Windows>().Install());
bus.Publish(new MyEvent());
#endregion
}
}
示例7: ConfigureBus
public void ConfigureBus(Configure config, string endpointName, IWindsorContainer container)
{
config.DefineEndpointName(endpointName);
config.CastleWindsorBuilder(container);
//config.UseNHibernateTimeoutPersister();
config.UseNHibernateSubscriptionPersister();
config.DisableTimeoutManager();
config.DefiningCommandsAs(t => t.GetInterfaces().Contains(typeof(Contracts.ICommand)));
config.DefiningEventsAs(t => t.GetInterfaces().Contains(typeof(Contracts.IEvent)));
config.SetEndpointSLA(TimeSpan.FromSeconds(600));
config.UnicastBus();
}
示例8: ConfigureSagaPersistence
ConfigureSagaPersistence(Configure configure)
{
#region saga-configure
Feature.Enable<Sagas>();
configure.DefaultBuilder();
configure.UseTransport<Msmq>();
configure.UnicastBus();
configure.RavenSagaPersister();
#endregion
}