#pragma warning restore CS0067 // The event is never used protected ServiceHostBase() { InternalBaseAddresses = new UriSchemeKeyedCollection(ThisLock); ChannelDispatchers = new ChannelDispatcherCollection(this, ThisLock); _extensions = new ExtensionCollection <ServiceHostBase>(this, ThisLock); _instances = new InstanceContextManager(ThisLock); }
protected ServiceHostBase() { this.baseAddresses = new UriSchemeKeyedCollection(this.ThisLock); this.channelDispatchers = new ChannelDispatcherCollection(this, this.ThisLock); this.extensions = new ExtensionCollection <ServiceHostBase>(this, this.ThisLock); this.instances = new InstanceContextManager(this.ThisLock); }
//public int IncrementManualFlowControlLimit(int incrementBy) //{ // throw new PlatformNotSupportedException(); //} protected void InitializeDescription(UriSchemeKeyedCollection baseAddresses) { foreach (Uri baseAddress in baseAddresses) { InternalBaseAddresses.Add(baseAddress); } Description = CreateDescription(out _implementedContracts); _initializeDescriptionHasFinished = true; }
protected void InitializeDescription(UriSchemeKeyedCollection baseAddresses) { foreach (Uri baseAddress in baseAddresses) { this.baseAddresses.Add(baseAddress); } description = CreateDescription(out implementedContracts); ApplyConfiguration(); initializeDescriptionHasFinished = true; }
internal static Uri GetVia(string scheme, Uri address, UriSchemeKeyedCollection baseAddresses) { Uri via = address; if (!via.IsAbsoluteUri) { if (!baseAddresses.Contains(scheme)) { return(null); } via = GetUri(baseAddresses[scheme], address); } return(via); }
protected void InitializeDescription(UriSchemeKeyedCollection baseAddresses) { foreach (Uri baseAddress in baseAddresses) { this.baseAddresses.Add(baseAddress); } IDictionary <string, ContractDescription> implementedContracts = null; ServiceDescription description = CreateDescription(out implementedContracts); this.description = description; this.implementedContracts = implementedContracts; ApplyConfiguration(); initializeDescriptionHasFinished = true; }
internal static string GetBaseAddressSchemes(UriSchemeKeyedCollection uriSchemeKeyedCollection) { StringBuilder buffer = new StringBuilder(); bool firstScheme = true; foreach (Uri address in uriSchemeKeyedCollection) { if (firstScheme) { buffer.Append(address.Scheme); firstScheme = false; } else { buffer.Append(CultureInfo.CurrentCulture.TextInfo.ListSeparator).Append(address.Scheme); } } return(buffer.ToString()); }
internal static Uri GetVia(string scheme, Uri address, UriSchemeKeyedCollection baseAddresses) { Uri via = address; if (!via.IsAbsoluteUri) { Uri baseAddress = null; foreach (var ba in baseAddresses) { if (ba.Scheme.Equals(scheme)) { baseAddress = ba; break; } } if (baseAddress == null) { return(null); } via = GetUri(baseAddress, address); } return(via); }
internal static Uri MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Binding binding, UriSchemeKeyedCollection baseAddresses) { Uri result = relativeOrAbsoluteUri; if (!result.IsAbsoluteUri) { if (binding.Scheme == string.Empty) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.SFxCustomBindingWithoutTransport)); } result = GetVia(binding.Scheme, result, baseAddresses); if (result == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.SFxEndpointNoMatchingScheme, binding.Scheme, binding.Name, GetBaseAddressSchemes(baseAddresses)))); } } return(result); }