本文整理汇总了C#中BusConfiguration.CustomConfigurationSource方法的典型用法代码示例。如果您正苦于以下问题:C# BusConfiguration.CustomConfigurationSource方法的具体用法?C# BusConfiguration.CustomConfigurationSource怎么用?C# BusConfiguration.CustomConfigurationSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BusConfiguration
的用法示例。
在下文中一共展示了BusConfiguration.CustomConfigurationSource方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Customize
public void Customize(BusConfiguration configuration)
{
configuration.UsePersistence<DatabaseRoutingInMemoryPersistence>();
configuration.DisableFeature<AutoSubscribe>();
configuration.Pipeline.Register<DatabaseRouting.DatabaseRoutingStepInPipeline>();
configuration.CustomConfigurationSource(new DatabaseRoutingConfiguration());
}
示例2: Usage
public Usage()
{
BusConfiguration busConfiguration = new BusConfiguration();
#region inject-endpoint-mapping-configuration-source
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例3: Main
static void Main(string[] args)
{
Console.Title = "Complaint.Backend";
Console.WriteLine("Complaint Backend starting up...");
var configuration = new BusConfiguration();
configuration.Conventions()
.DefiningCommandsAs(t => t.Namespace != null && t.Namespace.StartsWith("SiriusCyberneticsCorp.InternalMessages"))
.DefiningEventsAs(t => t.Namespace != null && t.Namespace.StartsWith("SiriusCyberneticsCorp.Contract"));
configuration.CustomConfigurationSource(new CustomConfigurationSource());
configuration.UseSerialization<JsonSerializer>();
configuration.UsePersistence<RavenDBPersistence>();
configuration.UseTransport<MsmqTransport>();
var bus = Bus.Create(configuration).Start();
Console.WriteLine("Press any key to shut down.");
Console.ReadLine();
Console.WriteLine("Complaint Backend shutting down...");
bus.Dispose();
}
示例4: ConfigurationSourceUsage
public ConfigurationSourceUsage()
{
#region ConfigurationSourceUsageForMessageForwarding
BusConfiguration busConfiguration = new BusConfiguration();
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例5: GetConfiguration
public BusConfiguration GetConfiguration(RunDescriptor runDescriptor, EndpointConfiguration endpointConfiguration, IConfigurationSource configSource, Action<BusConfiguration> configurationBuilderCustomization)
{
var settings = runDescriptor.Settings;
LogManager.UseFactory(new ContextAppender(runDescriptor.ScenarioContext, endpointConfiguration.EndpointName));
var types = GetTypesScopedByTestClass(endpointConfiguration);
typesToInclude.AddRange(types);
var builder = new BusConfiguration();
builder.EndpointName(endpointConfiguration.EndpointName);
builder.TypesToScan(typesToInclude);
builder.CustomConfigurationSource(configSource);
builder.EnableInstallers();
builder.DefineTransport(settings, endpointConfiguration.BuilderType);
builder.DefineTransactions(settings);
builder.DefineBuilder(settings);
builder.RegisterComponents(r =>
{
r.RegisterSingleton(runDescriptor.ScenarioContext.GetType(), runDescriptor.ScenarioContext);
r.RegisterSingleton(typeof(ScenarioContext), runDescriptor.ScenarioContext);
});
SetSerializer(settings, builder);
builder.DefinePersistence(settings);
builder.GetSettings().SetDefault("ScaleOut.UseSingleBrokerQueue", true);
configurationBuilderCustomization(builder);
return builder;
}
示例6: GetConfiguration
public BusConfiguration GetConfiguration(RunDescriptor runDescriptor, EndpointConfiguration endpointConfiguration, IConfigurationSource configSource, Action<BusConfiguration> configurationBuilderCustomization)
{
var settings = runDescriptor.Settings;
var types = GetTypesToUse(endpointConfiguration);
var config = new BusConfiguration();
config.EndpointName(endpointConfiguration.EndpointName);
config.TypesToScan(types);
config.CustomConfigurationSource(configSource);
config.UsePersistence<InMemoryPersistence>();
config.PurgeOnStartup(true);
// Plugin a behavior that listens for subscription messages
config.Pipeline.Register<SubscriptionBehavior.Registration>();
config.RegisterComponents(c => c.ConfigureComponent<SubscriptionBehavior>(DependencyLifecycle.InstancePerCall));
// Important: you need to make sure that the correct ScenarioContext class is available to your endpoints and tests
config.RegisterComponents(r =>
{
r.RegisterSingleton(runDescriptor.ScenarioContext.GetType(), runDescriptor.ScenarioContext);
r.RegisterSingleton(typeof(ScenarioContext), runDescriptor.ScenarioContext);
});
// Call extra custom action if provided
if (configurationBuilderCustomization != null)
{
configurationBuilderCustomization(config);
}
return config;
}
示例7: Usage
public Usage()
{
BusConfiguration busConfiguration = new BusConfiguration();
#region UseCustomConfigurationSourceForErrorQueueConfig
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例8: Usage
public Usage()
{
BusConfiguration busConfiguration = new BusConfiguration();
#region FLRConfigurationSourceUsage
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例9: Usage
public Usage()
{
BusConfiguration busConfiguration = new BusConfiguration();
#region UseCustomConfigurationSourceForGatewaySitesConfig
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例10: Usage
Usage(BusConfiguration busConfiguration)
{
#region inject-endpoint-mapping-configuration-source
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例11: Usage
Usage(BusConfiguration busConfiguration)
{
#region UseCustomConfigurationSourceForGatewayChannelsConfig
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例12: Usage
Usage(BusConfiguration busConfiguration)
{
#region SLRConfigurationSourceUsage
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例13: Usage
Usage(BusConfiguration busConfiguration)
{
#region UseCustomConfigurationSourceForErrorQueueConfig
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}
示例14: Create
static ISendOnlyBus Create()
{
var config = new BusConfiguration();
config.EndpointName("nsbSender");
config.UseTransport<AzureServiceBusTransport>()
.ConnectionString(settings.GetConnectionString())
.BrokeredMessageBodyInterceptors(m => m.ToBytes(), b => b.ToBrokeredMessage());
config.UseSerialization<JsonSerializer>();
config.UsePersistence<InMemoryPersistence>();
config.CustomConfigurationSource(new EndpointMappingConfigurationSource(new []
{
new MessageEndpointMapping
{
AssemblyName = "MessageContracts",
Endpoint = settings.QueueName
}
}));
return Bus.CreateSendOnly(config);
}
示例15: ConfigurationSourceUsage
ConfigurationSourceUsage(BusConfiguration busConfiguration)
{
#region ConfigurationSourceUsageForMessageForwarding
busConfiguration.CustomConfigurationSource(new ConfigurationSource());
#endregion
}