Example #1
0
 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);
 }
Example #2
0
        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());
        }
Example #3
0
 public BusEndpointInfo(BusEndpointType type, string applicationName)
     : this(type, applicationName, Environment.MachineName)
 {
 }