Permalink
Browse files

Merge branch 'HostConfigurationPathSupport' of https://github.com/lah…

…ma/rhino-esb into lahma-host
  • Loading branch information...
CoreyKaylor committed Aug 12, 2011
2 parents 6ed5430 + f13eedf commit 20bda19d72a983fe7c9bf03eac38bc5ed6655d49
@@ -13,6 +13,7 @@ public class HostConfiguration
private string LoadBalancerEndpoint { get; set; }
private string SecurityKey { get; set; }
protected string LogEndpoint { get; set; }
+ private string Path { get; set; }
private IDictionary<string, HostConfigMessageEndpoint> Messages { get; set; }
public HostConfiguration()
@@ -70,6 +71,12 @@ public HostConfiguration Security(string key)
return this;
}
+ public HostConfiguration StoragePath(string path)
+ {
+ Path = path;
+ return this;
+ }
+
public HostConfiguration Receive(string messageName, string endpoint)
{
return Receive(messageName, endpoint, false);
@@ -95,6 +102,7 @@ public virtual BusConfigurationSection ToBusConfiguration()
config.Bus.LoadBalancerEndpoint = LoadBalancerEndpoint;
config.Bus.LogEndpoint = LogEndpoint;
config.Bus.Transactional = Transactional.ToString();
+ config.Bus.Path = Path;
config.Security.Key = SecurityKey;
foreach (var message in Messages)
{
@@ -4,20 +4,13 @@ namespace Rhino.ServiceBus.Hosting
{
public class RhinoQueuesHostConfiguration : HostConfiguration
{
- private string path;
private bool enablePerformanceCounters;
public RhinoQueuesHostConfiguration()
{
enablePerformanceCounters = false;
}
- public RhinoQueuesHostConfiguration StoragePath(string path)
- {
- this.path = path;
- return this;
- }
-
public RhinoQueuesHostConfiguration EnablePerformanceCounters()
{
enablePerformanceCounters = true;
@@ -27,9 +20,6 @@ public RhinoQueuesHostConfiguration EnablePerformanceCounters()
public override BusConfigurationSection ToBusConfiguration()
{
var config = base.ToBusConfiguration();
-
- if (string.IsNullOrEmpty(path) == false)
- config.Bus.Path = path;
config.Bus.EnablePerformanceCounters = enablePerformanceCounters;

0 comments on commit 20bda19

Please sign in to comment.