Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- VisualStateChangedEventArgs.cs
- ToolboxItemImageConverter.cs
- ScriptRef.cs
- SimpleHandlerBuildProvider.cs
- BatchStream.cs
- DetailsViewUpdateEventArgs.cs
- NonParentingControl.cs
- FixedPageProcessor.cs
- BridgeDataRecord.cs
- StaticSiteMapProvider.cs
- FirstMatchCodeGroup.cs
- ModuleElement.cs
- HtmlInputImage.cs
- BypassElement.cs
- DataGridTextBox.cs
- GridLengthConverter.cs
- SqlProviderManifest.cs
- CharacterString.cs
- RuleSetReference.cs
- TrackingExtract.cs
- ImpersonateTokenRef.cs
- GridEntry.cs
- ClickablePoint.cs
- PopupEventArgs.cs
- SortedSetDebugView.cs
- NumberAction.cs
- ListBoxItem.cs
- WebUtil.cs
- SimpleApplicationHost.cs
- TextBoxRenderer.cs
- XmlAttributeCollection.cs
- SchemaImporter.cs
- DocumentViewerAutomationPeer.cs
- ContourSegment.cs
- SubpageParagraph.cs
- TextTrailingCharacterEllipsis.cs
- OleDbReferenceCollection.cs
- GenericParameterDataContract.cs
- WithStatement.cs
- DataKeyArray.cs
- TdsParserHelperClasses.cs
- MachineKey.cs
- BamlMapTable.cs
- InstancePersistenceException.cs
- NullExtension.cs
- RuntimeConfig.cs
- IdentifierService.cs
- CodeTypeMemberCollection.cs
- RelationalExpressions.cs
- SymmetricAlgorithm.cs
- LocatorPart.cs
- EdmItemCollection.OcAssemblyCache.cs
- ToolBarButton.cs
- DiscoveryClientProtocol.cs
- ToolTipAutomationPeer.cs
- SQLBytesStorage.cs
- MouseButtonEventArgs.cs
- arclist.cs
- ListViewTableCell.cs
- InstanceData.cs
- X509Certificate2Collection.cs
- SmtpCommands.cs
- XmlQuerySequence.cs
- RTLAwareMessageBox.cs
- BinaryMessageFormatter.cs
- EntityRecordInfo.cs
- ByteFacetDescriptionElement.cs
- ComponentSerializationService.cs
- GrammarBuilderWildcard.cs
- PropertyMappingExceptionEventArgs.cs
- DataColumnChangeEvent.cs
- PatternMatchRules.cs
- App.cs
- NativeRightsManagementAPIsStructures.cs
- CompositeFontFamily.cs
- ContentFilePart.cs
- DataGridViewLinkColumn.cs
- ZipIOExtraFieldPaddingElement.cs
- CodeDirectionExpression.cs
- XsdDateTime.cs
- ListComponentEditorPage.cs
- GroupBoxDesigner.cs
- NaturalLanguageHyphenator.cs
- ObjectToken.cs
- XMLUtil.cs
- SingleConverter.cs
- SymmetricCryptoHandle.cs
- DrawListViewItemEventArgs.cs
- OleDbWrapper.cs
- TypeHelper.cs
- SmuggledIUnknown.cs
- BmpBitmapEncoder.cs
- SoapExtensionReflector.cs
- DBCommand.cs
- GridViewColumnHeader.cs
- PasswordRecovery.cs
- DataGridViewRowsRemovedEventArgs.cs
- AuthenticationModulesSection.cs
- ProfileManager.cs
- DependencyPropertyValueSerializer.cs