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
- ToolStripPanelRenderEventArgs.cs
- Logging.cs
- ReadOnlyNameValueCollection.cs
- AssemblyHash.cs
- RegexTypeEditor.cs
- OrderPreservingSpoolingTask.cs
- PopOutPanel.cs
- ReceiveDesigner.xaml.cs
- XamlPoint3DCollectionSerializer.cs
- BridgeDataRecord.cs
- Int32CAMarshaler.cs
- TypeUtil.cs
- ThreadLocal.cs
- SafeSystemMetrics.cs
- ListViewDesigner.cs
- URLAttribute.cs
- EditorPart.cs
- DataTableReader.cs
- Rectangle.cs
- DeobfuscatingStream.cs
- Literal.cs
- XsltLibrary.cs
- WebPartHeaderCloseVerb.cs
- RootProfilePropertySettingsCollection.cs
- CommonGetThemePartSize.cs
- ListItemConverter.cs
- FilePrompt.cs
- InheritanceRules.cs
- ProfileParameter.cs
- ItemsPresenter.cs
- EntityViewGenerationConstants.cs
- RolePrincipal.cs
- StateManagedCollection.cs
- ThreadExceptionDialog.cs
- DataBindingCollection.cs
- OleDbReferenceCollection.cs
- SqlIdentifier.cs
- unsafeIndexingFilterStream.cs
- ByValueEqualityComparer.cs
- XmlnsCache.cs
- AuthorizationSection.cs
- DisplayInformation.cs
- SmtpNtlmAuthenticationModule.cs
- WindowsImpersonationContext.cs
- dtdvalidator.cs
- CallbackValidatorAttribute.cs
- BamlTreeMap.cs
- NodeInfo.cs
- SortFieldComparer.cs
- DragEventArgs.cs
- IsolatedStoragePermission.cs
- ColorBlend.cs
- PackagingUtilities.cs
- shaperfactoryquerycacheentry.cs
- Oci.cs
- PlaceHolder.cs
- SubclassTypeValidatorAttribute.cs
- XmlAttributeAttribute.cs
- ExclusiveCanonicalizationTransform.cs
- PagerStyle.cs
- FormsAuthenticationCredentials.cs
- IInstanceTable.cs
- EventItfInfo.cs
- EventListener.cs
- Visual3DCollection.cs
- WriteTimeStream.cs
- DockPattern.cs
- __Filters.cs
- AsyncResult.cs
- ParameterExpression.cs
- InternalResources.cs
- ProtocolsSection.cs
- PageParserFilter.cs
- ByeOperationCD1AsyncResult.cs
- PersonalizationProviderCollection.cs
- RegexCapture.cs
- DebugHandleTracker.cs
- EntityDataSourceViewSchema.cs
- XmlWhitespace.cs
- SafeNativeMethods.cs
- MemoryFailPoint.cs
- PermissionSetTriple.cs
- TransactionsSectionGroup.cs
- Directory.cs
- XmlIncludeAttribute.cs
- DataGrid.cs
- GraphicsState.cs
- SafeBuffer.cs
- DateTimePicker.cs
- Util.cs
- DataBoundControlHelper.cs
- StreamGeometry.cs
- ApplicationProxyInternal.cs
- XPathItem.cs
- ServiceHttpHandlerFactory.cs
- ClientConfigurationHost.cs
- SpinWait.cs
- IntegerValidatorAttribute.cs
- URLAttribute.cs
- AnonymousIdentificationSection.cs