Skip to content

Commit

Permalink
Merge branch 'HostConfigurationPathSupport' of https://github.com/lah…
Browse files Browse the repository at this point in the history
…ma/rhino-esb into lahma-host
  • Loading branch information
CoreyKaylor committed Aug 12, 2011
2 parents 6ed5430 + f13eedf commit 20bda19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 8 additions & 0 deletions Rhino.ServiceBus/Hosting/HostConfiguration.cs
Expand Up @@ -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()
Expand Down Expand Up @@ -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);
Expand All @@ -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)
{
Expand Down
10 changes: 0 additions & 10 deletions Rhino.ServiceBus/Hosting/RhinoQueuesHostConfiguration.cs
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 20bda19

Please sign in to comment.