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


C# BusConfiguration.CustomConfigurationSource方法代码示例

本文整理汇总了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());
 }
开发者ID:ramonsmits,项目名称:NServiceBus-RoutingInDataBase,代码行数:7,代码来源:EndpointConfig.cs

示例2: Usage

 public Usage()
 {
     BusConfiguration busConfiguration = new BusConfiguration();
     #region inject-endpoint-mapping-configuration-source
     busConfiguration.CustomConfigurationSource(new ConfigurationSource());
     #endregion
 }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:7,代码来源:Usage.cs

示例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();
        }
开发者ID:danielmarbach,项目名称:nservicebus.introduction,代码行数:26,代码来源:Program.cs

示例4: ConfigurationSourceUsage

 public ConfigurationSourceUsage()
 {
     #region ConfigurationSourceUsageForMessageForwarding
     BusConfiguration busConfiguration = new BusConfiguration();
     busConfiguration.CustomConfigurationSource(new ConfigurationSource());
     #endregion
 }
开发者ID:fivec,项目名称:docs.particular.net,代码行数:7,代码来源:ConfigurationSourceUsage.cs

示例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;
        }
开发者ID:hmemcpy,项目名称:NServiceBus.Jil,代码行数:35,代码来源:DefaultServer.cs

示例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;
        }
开发者ID:narnau,项目名称:NServiceBus.AcceptanceTesting,代码行数:32,代码来源:DefaultServer.cs

示例7: Usage

        public Usage()
        {
            BusConfiguration busConfiguration = new BusConfiguration();

            #region UseCustomConfigurationSourceForErrorQueueConfig
            busConfiguration.CustomConfigurationSource(new ConfigurationSource());
            #endregion
        }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:8,代码来源:Usage.cs

示例8: Usage

        public Usage()
        {
            BusConfiguration busConfiguration = new BusConfiguration();

            #region FLRConfigurationSourceUsage
            busConfiguration.CustomConfigurationSource(new ConfigurationSource());
            #endregion
        }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:8,代码来源:Usage.cs

示例9: Usage

        public Usage()
        {
            BusConfiguration busConfiguration = new BusConfiguration();

            #region UseCustomConfigurationSourceForGatewaySitesConfig
            busConfiguration.CustomConfigurationSource(new ConfigurationSource());
            #endregion
        }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:8,代码来源:Usage.cs

示例10: Usage

 Usage(BusConfiguration busConfiguration)
 {
     #region inject-endpoint-mapping-configuration-source
     busConfiguration.CustomConfigurationSource(new ConfigurationSource());
     #endregion
 }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:6,代码来源:Usage.cs

示例11: Usage

 Usage(BusConfiguration busConfiguration)
 {
     #region UseCustomConfigurationSourceForGatewayChannelsConfig
     busConfiguration.CustomConfigurationSource(new ConfigurationSource());
     #endregion
 }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:6,代码来源:Usage.cs

示例12: Usage

 Usage(BusConfiguration busConfiguration)
 {
     #region SLRConfigurationSourceUsage
     busConfiguration.CustomConfigurationSource(new ConfigurationSource());
     #endregion
 }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:6,代码来源:Usage.cs

示例13: Usage

 Usage(BusConfiguration busConfiguration)
 {
     #region UseCustomConfigurationSourceForErrorQueueConfig
     busConfiguration.CustomConfigurationSource(new ConfigurationSource());
     #endregion
 }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:6,代码来源:Usage.cs

示例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);
        }
开发者ID:kevinhillinger,项目名称:NServiceBus.AzureServiceBus.Serialization.Interop,代码行数:21,代码来源:Program.cs

示例15: ConfigurationSourceUsage

 ConfigurationSourceUsage(BusConfiguration busConfiguration)
 {
     #region ConfigurationSourceUsageForMessageForwarding
     busConfiguration.CustomConfigurationSource(new ConfigurationSource());
     #endregion
 }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:6,代码来源:ConfigurationSourceUsage.cs


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