Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / SMSvcHost / System / ServiceModel / Activation / AppManager.cs / 1 / AppManager.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Activation { using System; using System.Collections; using System.Collections.Generic; using System.Security.Principal; using System.Diagnostics; using System.ServiceModel; // NOTE: This class is not thread-safe. The caller should perform synchronization. class AppManager { Dictionaryapps; Dictionary pools; public AppManager() { this.apps = new Dictionary (); this.pools = new Dictionary (); } public int AppsCount { get { return this.apps.Count; } } public Dictionary Apps { get { return this.apps; } } public Dictionary AppPools { get { return this.pools; } } public void CreateAppPool(string appPoolId, SecurityIdentifier sid) { AppPool appPool = new AppPool(appPoolId, false, sid); this.pools.Add(appPoolId, appPool); } public App CreateApp(string appKey, string path, int siteId, string appPoolId, bool requestsBlocked) { AppPool appPool = this.AppPools[appPoolId]; App app = new App(appKey, path, siteId, appPool, requestsBlocked); this.apps.Add(appKey, app); appPool.AddApp(app); return app; } public void DeleteAppPool(string appPoolId) { AppPool pool; if(this.pools.TryGetValue(appPoolId, out pool)) { if (pool != null) { foreach (App app in pool.SnapshotApps()) { DeleteApp(app, true); } pools.Remove(appPoolId); pool.OnDeleted(); } } } public void DeleteApp(App app, bool appPoolDeleted) { app.AppPool.RemoveApp(app); apps.Remove(app.AppKey); app.OnDeleted(appPoolDeleted); } public void Clear() { foreach(App app in apps.Values) { app.OnDeleted(false); } apps.Clear(); pools.Clear(); } } } // 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
- StringValidatorAttribute.cs
- DocumentOrderQuery.cs
- MembershipSection.cs
- ArgumentNullException.cs
- ApplicationSettingsBase.cs
- ShaperBuffers.cs
- FontDifferentiator.cs
- EntityTypeEmitter.cs
- OleDbError.cs
- UpdatePanelTrigger.cs
- MaskedTextBox.cs
- TemplatedControlDesigner.cs
- HyperLinkColumn.cs
- InvalidFilterCriteriaException.cs
- MarkupExtensionReturnTypeAttribute.cs
- SimplePropertyEntry.cs
- XmlLanguage.cs
- CommentAction.cs
- SecurityTokenException.cs
- Button.cs
- DataGridViewCellMouseEventArgs.cs
- XmlSignificantWhitespace.cs
- WebPartsSection.cs
- XmlBinaryReader.cs
- XhtmlBasicObjectListAdapter.cs
- InstanceDescriptor.cs
- TypeLibraryHelper.cs
- ResourceDefaultValueAttribute.cs
- TileModeValidation.cs
- ArgumentNullException.cs
- HitTestWithGeometryDrawingContextWalker.cs
- BufferModesCollection.cs
- GlyphRunDrawing.cs
- BinaryReader.cs
- SearchExpression.cs
- ManualResetEventSlim.cs
- QilTypeChecker.cs
- StyleHelper.cs
- ToolboxItemSnapLineBehavior.cs
- HttpCookiesSection.cs
- XmlQuerySequence.cs
- OneWayChannelFactory.cs
- HelpProvider.cs
- PassportAuthenticationEventArgs.cs
- MemoryPressure.cs
- XPathNodeList.cs
- AssemblyResourceLoader.cs
- ListDictionaryInternal.cs
- InstallerTypeAttribute.cs
- ContainerAction.cs
- KeyInterop.cs
- SecurityDocument.cs
- ContainerFilterService.cs
- IndicCharClassifier.cs
- X509PeerCertificateElement.cs
- SecureStringHasher.cs
- mansign.cs
- CollectionViewSource.cs
- WebSysDescriptionAttribute.cs
- SqlFileStream.cs
- objectquery_tresulttype.cs
- UnauthorizedWebPart.cs
- SqlTriggerContext.cs
- CodeConstructor.cs
- FaultPropagationRecord.cs
- UnionExpr.cs
- Padding.cs
- AttachedAnnotationChangedEventArgs.cs
- QilInvokeLateBound.cs
- ImmutableAssemblyCacheEntry.cs
- NativeMethodsOther.cs
- DetailsViewCommandEventArgs.cs
- ViewBase.cs
- CopyOfAction.cs
- ResourceProviderFactory.cs
- MenuItemCollectionEditorDialog.cs
- AsyncOperationManager.cs
- CompiledRegexRunner.cs
- CodeArrayIndexerExpression.cs
- ParserStack.cs
- XmlAnyElementAttributes.cs
- DbConnectionStringBuilder.cs
- Metadata.cs
- PropertyItemInternal.cs
- Ipv6Element.cs
- XPathItem.cs
- WebPartConnectionCollection.cs
- X509LogoTypeExtension.cs
- DocumentGrid.cs
- LoadedOrUnloadedOperation.cs
- OdbcParameter.cs
- ForEachDesigner.xaml.cs
- Slider.cs
- UrlPath.cs
- XmlSchemaImport.cs
- RuleProcessor.cs
- ProxyAssemblyNotLoadedException.cs
- UpdatePanelTriggerCollection.cs
- COM2ColorConverter.cs
- ExpanderAutomationPeer.cs