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


C# BusConfiguration.LicensePath方法代码示例

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


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

示例1: License

        License(BusConfiguration busConfiguration)
        {
            #region License

            busConfiguration.LicensePath("PathToLicense");
            //or
            busConfiguration.License("YourCustomLicenseText");

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

示例2: Simple

        public void Simple()
        {
            #region License
     
            BusConfiguration busConfiguration = new BusConfiguration();

            busConfiguration.LicensePath("PathToLicense");
            //or
            busConfiguration.License("YourCustomLicenseText");

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

示例3: Init

        public override ServiceStackHost Init()
        {
            LogManager.LogFactory = new Log4NetFactory(true);
            NServiceBus.Logging.LogManager.Use<NServiceBus.Log4Net.Log4NetFactory>();

            var serverEvents = new MemoryServerEvents
            {
                IdleTimeout = TimeSpan.FromSeconds(30),
                NotifyChannelOfSubscriptions = false
            };

            var store = ConfigureStore();
            var elastic = ConfigureElastic();
            var eventstore = ConfigureEventStore();

            _container = new Container(x =>
            {
                x.For<IManager>().Use<Manager>();
                x.For<ICacheClient>().Use(new MemoryCacheClient());
                x.For<IServerEvents>().Use(serverEvents);
                x.For<ISubscriptionManager>().Use<MemorySubscriptionManager>();
                x.For<IDocumentStore>().Use(store).Singleton();
                x.For<IElasticClient>().Use(elastic).Singleton();
                x.For<IEventStoreConnection>().Use(eventstore).Singleton();
                x.For<IQueryProcessor>().Use<QueryProcessor>();
                x.For<IPersistCheckpoints>().Use<RavenCheckpointPersister>();

                x.Scan(y =>
                {
                    AllAssemblies.Matching("Application").ToList().ForEach(a => y.Assembly(a));

                    y.WithDefaultConventions();
                    y.ConnectImplementationsToTypesClosing(typeof(IQueryHandler<,>));
                    y.ConnectImplementationsToTypesClosing(typeof(IPagingQueryHandler<,>));
                });
            });

            var config = new BusConfiguration();
            //var conventions = config.Conventions();
            //conventions
            //    .DefiningEventsAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && t.Namespace.EndsWith("Events"))
            //    .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && t.Namespace.EndsWith("Commands"))
            //    .DefiningMessagesAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && (t.Namespace.EndsWith("Messages") || t.Namespace.EndsWith("Queries")));

            config.LicensePath(@"C:\License.xml");

            var endpoint = ConfigurationManager.AppSettings["endpoint"];
            if (string.IsNullOrEmpty(endpoint))
                endpoint = "application.servicestack";

            config.EndpointName(endpoint);
            //config.AssembliesToScan(AllAssemblies.Matching("Presentation").And("Application").And("Domain").And("Library"));

            config.UsePersistence<InMemoryPersistence>();
            config.UseContainer<StructureMapBuilder>(c => c.ExistingContainer(_container));
            config.UseSerialization<NServiceBus.JsonSerializer>();
            config.EnableInstallers();

            config.EnableFeature<Aggregates.EventStore>();
            config.EnableFeature<Aggregates.DurableConsumer>();

            var bus = Bus.Create(config).Start();

            _container.Configure(x => x.For<IBus>().Use(bus).Singleton());

            return base.Init();
        }
开发者ID:org-itbiz,项目名称:DDD.Enterprise.Example,代码行数:67,代码来源:AppHost.cs

示例4: Customize

        public void Customize(BusConfiguration config)
        {
            log4net.Config.XmlConfigurator.Configure();
            NServiceBus.Logging.LogManager.Use<Log4NetFactory>();

            var client = ConfigureStore();

            _container = new Container(x =>
            {
                x.For<IManager>().Use<Manager>();
                x.For<IEventStoreConnection>().Use(client).Singleton();
            });

            //var conventions = config.Conventions();
            //conventions
            //    .DefiningEventsAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && t.Namespace.EndsWith("Events"))
            //    .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && t.Namespace.EndsWith("Commands"))
            //    .DefiningMessagesAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && (t.Namespace.EndsWith("Messages") || t.Namespace.EndsWith("Queries")));

            config.LicensePath(@"C:\License.xml");

            var endpoint = ConfigurationManager.AppSettings["endpoint"];
            if (string.IsNullOrEmpty(endpoint))
                endpoint = "domain";

            config.EndpointName(endpoint);

            //config.AssembliesToScan(AllAssemblies.Matching("Domain").And("Library"));

            config.UsePersistence<InMemoryPersistence>();
            config.UseContainer<StructureMapBuilder>(c => c.ExistingContainer(_container));
            config.UseSerialization<NServiceBus.JsonSerializer>();

            config.EnableInstallers();

            config.EnableFeature<AggregatesNet>();
            config.EnableFeature<EventStore>();
        }
开发者ID:org-itbiz,项目名称:DDD.Enterprise.Example,代码行数:38,代码来源:EndpointConfig.cs

示例5: InitBus

        private static IBus InitBus()
        {
            _logger.Debug("Initializing Service Bus");
            NServiceBus.Logging.LogManager.Use<NServiceBus.Log4Net.Log4NetFactory>();

            var config = new BusConfiguration();
            //var conventions = config.Conventions();
            //conventions
            //    .DefiningEventsAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && t.Namespace.EndsWith("Events"))
            //    .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && t.Namespace.EndsWith("Commands"))
            //    .DefiningMessagesAs(t => t.Namespace != null && t.Namespace.StartsWith("Demo") && (t.Namespace.EndsWith("Messages") || t.Namespace.EndsWith("Queries")));

            config.LicensePath(@"C:\License.xml");

            var endpoint = ConfigurationManager.AppSettings["endpoint"];
            if (string.IsNullOrEmpty(endpoint))
                endpoint = "seed";

            config.EndpointName(endpoint);
            //config.AssembliesToScan(AllAssemblies.Matching("Presentation").And("Application").And("Domain").And("Library"));

            config.UsePersistence<InMemoryPersistence>();
            config.UseContainer<StructureMapBuilder>(c => c.ExistingContainer(_container));
            config.UseSerialization<NServiceBus.JsonSerializer>();

            config.EnableInstallers();

            return Bus.Create(config).Start();
        }
开发者ID:org-itbiz,项目名称:DDD.Enterprise.Example,代码行数:29,代码来源:Program.cs


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