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
- ApplicationManager.cs
- StartUpEventArgs.cs
- EncryptedType.cs
- SortExpressionBuilder.cs
- JsonUriDataContract.cs
- BCLDebug.cs
- Pointer.cs
- WCFModelStrings.Designer.cs
- ReadOnlyMetadataCollection.cs
- SHA1CryptoServiceProvider.cs
- ListBoxItemAutomationPeer.cs
- XPathNodeInfoAtom.cs
- ExpressionPrinter.cs
- TextElementAutomationPeer.cs
- XmlCharCheckingReader.cs
- IndexerHelper.cs
- cache.cs
- FontStyle.cs
- TextBox.cs
- StreamSecurityUpgradeAcceptorBase.cs
- ObjectParameterCollection.cs
- GridViewEditEventArgs.cs
- ContentIterators.cs
- XmlSchemaSet.cs
- MouseCaptureWithinProperty.cs
- URL.cs
- XslException.cs
- HwndMouseInputProvider.cs
- HtmlTable.cs
- DrawListViewSubItemEventArgs.cs
- UnsafeNativeMethods.cs
- TextServicesLoader.cs
- BamlLocalizer.cs
- documentation.cs
- XmlTextReaderImplHelpers.cs
- ExpressionPrefixAttribute.cs
- TailPinnedEventArgs.cs
- ServiceControllerDesigner.cs
- PageBuildProvider.cs
- AssertFilter.cs
- SiteMapDesignerDataSourceView.cs
- ChannelBase.cs
- RightsManagementEncryptedStream.cs
- DecoderFallbackWithFailureFlag.cs
- ZipIOLocalFileDataDescriptor.cs
- QueryContinueDragEventArgs.cs
- ActivityStateQuery.cs
- LocalizabilityAttribute.cs
- TypeSource.cs
- HttpListenerContext.cs
- SQLByte.cs
- StrokeNodeOperations.cs
- CompositeScriptReferenceEventArgs.cs
- WindowsFormsSynchronizationContext.cs
- TrustLevel.cs
- ValidationSummary.cs
- DesignerOptionService.cs
- CqlBlock.cs
- ProviderCommandInfoUtils.cs
- OutputCacheProfile.cs
- LicenseContext.cs
- MenuItemBinding.cs
- FormsAuthenticationCredentials.cs
- DataRecordObjectView.cs
- MatrixCamera.cs
- CookielessData.cs
- RegionInfo.cs
- EntityStoreSchemaFilterEntry.cs
- SqlWorkflowPersistenceService.cs
- DetailsViewUpdatedEventArgs.cs
- TriggerAction.cs
- DataViewSettingCollection.cs
- BamlResourceContent.cs
- KoreanLunisolarCalendar.cs
- MDIControlStrip.cs
- MailDefinition.cs
- ReflectionPermission.cs
- SqlInfoMessageEvent.cs
- LinqDataSourceInsertEventArgs.cs
- TTSEngineProxy.cs
- ItemAutomationPeer.cs
- HashRepartitionStream.cs
- PagePropertiesChangingEventArgs.cs
- DataGridSortCommandEventArgs.cs
- DataTableNameHandler.cs
- CookieProtection.cs
- EdgeProfileValidation.cs
- DataTableNewRowEvent.cs
- CompoundFileDeflateTransform.cs
- MetadataSet.cs
- ResolveMatchesApril2005.cs
- EmbeddedObject.cs
- EventListener.cs
- RadioButtonList.cs
- AsmxEndpointPickerExtension.cs
- EventMetadata.cs
- HtmlImage.cs
- ClientConfigurationSystem.cs
- UnsafeNativeMethods.cs
- CacheMode.cs