Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Activation / HostedTransportConfigurationBase.cs / 1 / HostedTransportConfigurationBase.cs
//---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------------------- using System.Collections.Generic; using System.ServiceModel; using System.ServiceModel.Channels; using System.Globalization; using System.Web.Hosting; using System.Web; namespace System.ServiceModel.Activation { abstract class HostedTransportConfigurationBase : HostedTransportConfiguration { ListlistenAddresses; string scheme; internal protected HostedTransportConfigurationBase(string scheme) { this.scheme = scheme; this.listenAddresses = new List (); } internal string Scheme { get { return scheme; } } internal protected IList ListenAddresses { get { return listenAddresses; } } public override Uri[] GetBaseAddresses(string virtualPath) { Uri[] addresses = new Uri[listenAddresses.Count]; for (int i = 0; i < listenAddresses.Count; i++) { string absoluteVirtualPath = VirtualPathUtility.ToAbsolute(virtualPath, HostingEnvironmentWrapper.ApplicationVirtualPath); addresses[i] = new Uri(listenAddresses[i].BaseAddress, absoluteVirtualPath); } return addresses; } internal BaseUriWithWildcard FindBaseAddress(Uri uri) { BaseUriWithWildcard foundBaseAddress = null; BaseUriWithWildcard weakBaseAddress = null; for (int i = 0; i < listenAddresses.Count; i++) { if ((string.Compare(listenAddresses[i].BaseAddress.Scheme, uri.Scheme, StringComparison.OrdinalIgnoreCase) == 0) && (listenAddresses[i].BaseAddress.Port == uri.Port)) { if (listenAddresses[i].HostNameComparisonMode == HostNameComparisonMode.StrongWildcard) { return listenAddresses[i]; } if (listenAddresses[i].HostNameComparisonMode == HostNameComparisonMode.WeakWildcard) { weakBaseAddress = listenAddresses[i]; } if ((listenAddresses[i].HostNameComparisonMode == HostNameComparisonMode.Exact) && (string.Compare(listenAddresses[i].BaseAddress.Host, uri.Host, StringComparison.OrdinalIgnoreCase) == 0)) { foundBaseAddress = listenAddresses[i]; } } } if (foundBaseAddress == null) foundBaseAddress = weakBaseAddress; return foundBaseAddress; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageSourceValueSerializer.cs
- QilInvoke.cs
- ProtocolsConfigurationEntry.cs
- HybridDictionary.cs
- ParseElementCollection.cs
- ApplicationSecurityInfo.cs
- CopyNodeSetAction.cs
- DispatchWrapper.cs
- TimeEnumHelper.cs
- URIFormatException.cs
- TaskForm.cs
- Utils.cs
- ServerValidateEventArgs.cs
- ErrorActivity.cs
- DetailsView.cs
- AuthenticationSection.cs
- DataGridParentRows.cs
- ColorInterpolationModeValidation.cs
- PositiveTimeSpanValidatorAttribute.cs
- FontWeights.cs
- TabControlCancelEvent.cs
- State.cs
- InfoCardListRequest.cs
- InputLangChangeEvent.cs
- SystemThemeKey.cs
- TagPrefixCollection.cs
- SQLByteStorage.cs
- RuntimeHandles.cs
- Point4DValueSerializer.cs
- Filter.cs
- ObjectReaderCompiler.cs
- ListDataHelper.cs
- BrowserDefinitionCollection.cs
- Mutex.cs
- ExpanderAutomationPeer.cs
- MetaModel.cs
- ContentWrapperAttribute.cs
- _NetworkingPerfCounters.cs
- ContentFileHelper.cs
- HttpCacheParams.cs
- TypeBuilderInstantiation.cs
- XPathItem.cs
- HiddenField.cs
- ClassImporter.cs
- PingOptions.cs
- UnmanagedBitmapWrapper.cs
- ValidationErrorCollection.cs
- RoutedEvent.cs
- TagMapInfo.cs
- IPPacketInformation.cs
- CustomExpression.cs
- EdmError.cs
- VersionUtil.cs
- OuterGlowBitmapEffect.cs
- OleDbError.cs
- ProfileGroupSettingsCollection.cs
- ManagementQuery.cs
- DPTypeDescriptorContext.cs
- ConfigWriter.cs
- Descriptor.cs
- KeyFrames.cs
- XmlStreamStore.cs
- HighContrastHelper.cs
- PageParser.cs
- GenericParameterDataContract.cs
- DropSource.cs
- VideoDrawing.cs
- AxisAngleRotation3D.cs
- DiscoveryExceptionDictionary.cs
- ShaperBuffers.cs
- LayoutTableCell.cs
- ViewBox.cs
- EndpointDiscoveryMetadata.cs
- Wizard.cs
- RecordManager.cs
- QilPatternFactory.cs
- SafeFileMappingHandle.cs
- COM2PropertyBuilderUITypeEditor.cs
- Application.cs
- SQLStringStorage.cs
- RepeaterDataBoundAdapter.cs
- ISAPIApplicationHost.cs
- PointUtil.cs
- WebRequestModulesSection.cs
- DataService.cs
- ShapingEngine.cs
- ManagementEventArgs.cs
- Sentence.cs
- RoleGroupCollection.cs
- DataGridViewCellFormattingEventArgs.cs
- StatusBarPanelClickEvent.cs
- EnumerableRowCollectionExtensions.cs
- BoolExpressionVisitors.cs
- KeyGesture.cs
- SQLInt16Storage.cs
- ErrorWrapper.cs
- ScriptResourceAttribute.cs
- ToolStripDropDownClosingEventArgs.cs
- BufferedGenericXmlSecurityToken.cs
- SqlCacheDependencySection.cs