Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / xsp / System / Web / Extensions / ApplicationServices / ApplicationServicesHostFactory.cs / 1 / ApplicationServicesHostFactory.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.ServiceModel; using System.ServiceModel.Activation; namespace System.Web.ApplicationServices { [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] public class ApplicationServicesHostFactory : ServiceHostFactory { [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { ServiceHost host = null; if (typeof(ProfileService).Equals(serviceType)) { host = new ServiceHost(new ProfileService(), baseAddresses); } else if (typeof(RoleService).Equals(serviceType)) { host = new ServiceHost(new RoleService(), baseAddresses); } else if (typeof(AuthenticationService).Equals(serviceType)) { host = new ServiceHost(new AuthenticationService(), baseAddresses); } else { host = base.CreateServiceHost(serviceType, baseAddresses); } return host; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.ServiceModel; using System.ServiceModel.Activation; namespace System.Web.ApplicationServices { [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] public class ApplicationServicesHostFactory : ServiceHostFactory { [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase", Justification = "Can't modify the base class.")] protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { ServiceHost host = null; if (typeof(ProfileService).Equals(serviceType)) { host = new ServiceHost(new ProfileService(), baseAddresses); } else if (typeof(RoleService).Equals(serviceType)) { host = new ServiceHost(new RoleService(), baseAddresses); } else if (typeof(AuthenticationService).Equals(serviceType)) { host = new ServiceHost(new AuthenticationService(), baseAddresses); } else { host = base.CreateServiceHost(serviceType, baseAddresses); } return host; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- X509Certificate.cs
- FileDialog.cs
- RectAnimationBase.cs
- Roles.cs
- HighContrastHelper.cs
- Light.cs
- xml.cs
- ContourSegment.cs
- TextTreeRootTextBlock.cs
- TextAction.cs
- ScriptingRoleServiceSection.cs
- ResourceDisplayNameAttribute.cs
- TemplateField.cs
- VarRemapper.cs
- FrameworkElementFactory.cs
- HMACSHA256.cs
- COM2ComponentEditor.cs
- GroupBox.cs
- DataGridViewHitTestInfo.cs
- CompilerWrapper.cs
- MSHTMLHost.cs
- ValueProviderWrapper.cs
- ButtonChrome.cs
- Table.cs
- MsmqTransportSecurity.cs
- BoundsDrawingContextWalker.cs
- SiteMapSection.cs
- TextShapeableCharacters.cs
- CommonProperties.cs
- Console.cs
- WinInetCache.cs
- RuntimeHandles.cs
- RelativeSource.cs
- AuditLog.cs
- RowVisual.cs
- HtmlControlPersistable.cs
- FusionWrap.cs
- Vars.cs
- PropertyInformationCollection.cs
- ClientSession.cs
- XmlObjectSerializerReadContext.cs
- CommandManager.cs
- Simplifier.cs
- XPathException.cs
- FlowDocumentView.cs
- IPGlobalProperties.cs
- GatewayIPAddressInformationCollection.cs
- DataGridViewRowsRemovedEventArgs.cs
- TrackingMemoryStream.cs
- DispatcherHookEventArgs.cs
- SQLInt64Storage.cs
- ExpandCollapseProviderWrapper.cs
- ChannelBase.cs
- DataGridViewComboBoxColumnDesigner.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- Odbc32.cs
- PropertyMetadata.cs
- PageCatalogPartDesigner.cs
- basevalidator.cs
- WindowsListViewSubItem.cs
- FontSource.cs
- XmlParserContext.cs
- TemplateXamlTreeBuilder.cs
- CommandBindingCollection.cs
- Rectangle.cs
- EmptyElement.cs
- EmptyEnumerator.cs
- NonVisualControlAttribute.cs
- XmlChoiceIdentifierAttribute.cs
- MemoryRecordBuffer.cs
- ServiceOperationParameter.cs
- CustomPopupPlacement.cs
- SqlDataSourceTableQuery.cs
- UnknownBitmapEncoder.cs
- TextBlockAutomationPeer.cs
- FileNotFoundException.cs
- ZipIOModeEnforcingStream.cs
- Decoder.cs
- ConstantSlot.cs
- ToolStripLabel.cs
- UrlAuthFailedErrorFormatter.cs
- BaseTemplateCodeDomTreeGenerator.cs
- MappingMetadataHelper.cs
- ContextInformation.cs
- DoubleCollectionValueSerializer.cs
- ReadWriteObjectLock.cs
- TriggerActionCollection.cs
- ProvidePropertyAttribute.cs
- JsonMessageEncoderFactory.cs
- _OverlappedAsyncResult.cs
- MenuItem.cs
- Control.cs
- ConfigXmlText.cs
- CompressedStack.cs
- XsdBuildProvider.cs
- DataIdProcessor.cs
- UnsafeNativeMethods.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- DataGridDetailsPresenter.cs
- QilTernary.cs