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
- DataTableExtensions.cs
- AppDomainEvidenceFactory.cs
- ParserContext.cs
- WindowsListViewSubItem.cs
- PropertyPathConverter.cs
- VirtualPathUtility.cs
- DataErrorValidationRule.cs
- PropertyDescriptorComparer.cs
- SystemWebSectionGroup.cs
- BackStopAuthenticationModule.cs
- Parallel.cs
- PublishLicense.cs
- CultureMapper.cs
- DataGridViewAdvancedBorderStyle.cs
- DeclarativeCatalogPart.cs
- LinkClickEvent.cs
- DataServiceProviderWrapper.cs
- RuleInfoComparer.cs
- SmtpNtlmAuthenticationModule.cs
- AlphabeticalEnumConverter.cs
- IisTraceListener.cs
- DelegateArgument.cs
- ProfileSettingsCollection.cs
- ErrorEventArgs.cs
- FixedDSBuilder.cs
- HttpCachePolicyElement.cs
- basenumberconverter.cs
- XmlHierarchyData.cs
- Parameter.cs
- ServiceThrottlingBehavior.cs
- DbConnectionHelper.cs
- RectAnimationClockResource.cs
- ColorTransform.cs
- PrimitiveType.cs
- BaseHashHelper.cs
- DataGridViewLinkCell.cs
- OleDbSchemaGuid.cs
- AccessorTable.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- IntSecurity.cs
- TypeInitializationException.cs
- CharConverter.cs
- CatalogZoneBase.cs
- ScrollChangedEventArgs.cs
- BuildProviderUtils.cs
- DefaultSection.cs
- FontUnit.cs
- ObjectStateEntry.cs
- Condition.cs
- XmlSchemaChoice.cs
- ListViewEditEventArgs.cs
- DelegateOutArgument.cs
- XPathChildIterator.cs
- xmlfixedPageInfo.cs
- TraceUtility.cs
- FrameworkTemplate.cs
- DataGridViewLayoutData.cs
- CodeTryCatchFinallyStatement.cs
- XamlToRtfWriter.cs
- WorkflowClientDeliverMessageWrapper.cs
- PlatformNotSupportedException.cs
- HtmlInputSubmit.cs
- DataComponentGenerator.cs
- SmtpNtlmAuthenticationModule.cs
- WorkflowNamespace.cs
- DataRecordInfo.cs
- MobileUITypeEditor.cs
- ThrowHelper.cs
- SQLInt64.cs
- StylusButtonEventArgs.cs
- PeerServiceMessageContracts.cs
- MembershipValidatePasswordEventArgs.cs
- ListViewCommandEventArgs.cs
- ConnectionPointConverter.cs
- HandlerWithFactory.cs
- TreeViewImageKeyConverter.cs
- ToolboxDataAttribute.cs
- ExtenderProvidedPropertyAttribute.cs
- WaitHandleCannotBeOpenedException.cs
- Geometry3D.cs
- PerformanceCountersElement.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ExpressionBindingCollection.cs
- AuthStoreRoleProvider.cs
- WpfMemberInvoker.cs
- WebHttpBindingCollectionElement.cs
- Line.cs
- CapabilitiesAssignment.cs
- SqlDataSourceView.cs
- MaterialCollection.cs
- XmlLanguageConverter.cs
- StringSorter.cs
- CompositeFontInfo.cs
- ImageIndexConverter.cs
- SimpleHandlerFactory.cs
- Tuple.cs
- LinkDesigner.cs
- ProviderMetadataCachedInformation.cs
- DataBindingHandlerAttribute.cs
- BitFlagsGenerator.cs