本文整理汇总了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
}
示例2: Simple
public void Simple()
{
#region License
BusConfiguration busConfiguration = new BusConfiguration();
busConfiguration.LicensePath("PathToLicense");
//or
busConfiguration.License("YourCustomLicenseText");
#endregion
}
示例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();
}
示例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>();
}
示例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();
}