public BusEndpointInfo(BusEndpointType type, string applicationName, string machineName) { this.Type = type; this.Uri = this.GetBusUri(type, applicationName, machineName); this.LocalhostUri = this.GetBusUri(type, applicationName, "localhost"); this.QueueName = this.Uri.AbsolutePath.Replace(PrivateUriSegment, PrivateQueuePrefix); }
private Uri GetBusUri(BusEndpointType type, string applicationName, string machineName) { string endpointTypeSuffix = (type == BusEndpointType.Control) ? string.Empty : SuffixDelimiter + type.ToString(); return new Uri( string.Format( BusEndpointUriFormat, machineName, applicationName, endpointTypeSuffix) .ToLowerInvariant()); }
public BusEndpointInfo(BusEndpointType type, string applicationName) : this(type, applicationName, Environment.MachineName) { }