private bool CreateUniqueLocalAddress(out EndpointAddress address, out int priority) { long num = Interlocked.Increment(ref channelCount); if (num > 1L) { AddressHeader header = AddressHeader.CreateAddressHeader(XD.UtilityDictionary.UniqueEndpointHeaderName, XD.UtilityDictionary.UniqueEndpointHeaderNamespace, num); address = new EndpointAddress(this.innerChannelListener.Uri, new AddressHeader[] { header }); priority = 1; return(true); } address = new EndpointAddress(this.innerChannelListener.Uri, new AddressHeader[0]); priority = 0; return(false); }
bool CreateUniqueLocalAddress(out EndpointAddress address, out int priority) { long tempChannelCount = Interlocked.Increment(ref channelCount); if (tempChannelCount > 1) { AddressHeader uniqueEndpointHeader = AddressHeader.CreateAddressHeader(XD.UtilityDictionary.UniqueEndpointHeaderName, XD.UtilityDictionary.UniqueEndpointHeaderNamespace, tempChannelCount); address = new EndpointAddress(this.innerChannelListener.Uri, uniqueEndpointHeader); priority = 1; return(true); } else { address = new EndpointAddress(this.innerChannelListener.Uri); priority = 0; return(false); } }