Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / SMSvcHost / System / ServiceModel / Activation / App.cs / 1 / App.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Activation { using System; using System.ServiceModel.Channels; using System.Collections.Generic; using System.Diagnostics; using System.Security.Principal; using System.ServiceModel; class App { string appKey; AppPool appPool; int siteId; IActivatedMessageQueue messageQueue; string path; bool requestBlocked; bool hasInvalidBinding; AppAction pendingAction; internal App(string appKey, string path, int siteId, AppPool appPool, bool requestsBlocked) : base() { Debug.Print("App.ctor(appKey:" + appKey + " path:" + path + " appPoolId:" + appPool.AppPoolId + ")"); this.appKey = appKey; this.path = path; this.appPool = appPool; this.siteId = siteId; this.requestBlocked = requestsBlocked; } internal AppAction PendingAction { get { return this.pendingAction; } } internal void SetPendingAction(AppAction action) { if (action != null) { DiagnosticUtility.DebugAssert(this.pendingAction == null, "There is already a pending action."); } this.pendingAction = action; } internal void RegisterQueue(IActivatedMessageQueue messageQueue) { if (this.messageQueue != null) { DiagnosticUtility.DebugAssert("a message queue was already registered"); throw DiagnosticUtility.ExceptionUtility.ThrowHelperInternal(false); } this.messageQueue = messageQueue; } internal string AppKey { get { return appKey; } } internal AppPool AppPool { get { return appPool; } } internal int SiteId { get { return siteId; } } internal IActivatedMessageQueue MessageQueue { get { return messageQueue; } } internal string Path { get { return path; } set { this.path = value; } } internal void OnAppPoolChanged(AppPool newAppPool) { this.appPool = newAppPool; } internal void SetRequestBlocked(bool requestBlocked) { if (this.requestBlocked != requestBlocked) { this.requestBlocked = requestBlocked; OnStateChanged(); } } internal void OnAppPoolStateChanged() { OnStateChanged(); } internal void OnDeleted(bool appPoolDeleted) { messageQueue.Delete(); } internal bool IsEnabled { get { return this.appPool.IsEnabled && !this.requestBlocked && !this.hasInvalidBinding; } } internal void OnInvalidBinding(bool hasInvalidBinding) { this.hasInvalidBinding = hasInvalidBinding; OnStateChanged(); } void OnStateChanged() { messageQueue.SetEnabledState(this.IsEnabled); } } } // 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
- SectionInput.cs
- SecondaryIndexList.cs
- TextBox.cs
- XmlCompatibilityReader.cs
- SqlBulkCopyColumnMappingCollection.cs
- ScrollBarRenderer.cs
- ThemeInfoAttribute.cs
- CodeBinaryOperatorExpression.cs
- TraceListeners.cs
- ClaimTypes.cs
- HttpModuleAction.cs
- StrongNameSignatureInformation.cs
- AnnotationDocumentPaginator.cs
- TrustLevelCollection.cs
- TypeBrowser.xaml.cs
- SystemFonts.cs
- AccessDataSourceView.cs
- HtmlDocument.cs
- HtmlInputHidden.cs
- SecurityTokenProvider.cs
- RequestCacheManager.cs
- PathFigureCollectionValueSerializer.cs
- NamedObject.cs
- TaskSchedulerException.cs
- TraceContext.cs
- XmlSignificantWhitespace.cs
- WebPartMinimizeVerb.cs
- listviewsubitemcollectioneditor.cs
- MutexSecurity.cs
- PartialCachingControl.cs
- HttpException.cs
- ObjectSecurity.cs
- NaturalLanguageHyphenator.cs
- DataStorage.cs
- DbParameterCollection.cs
- DesignRelationCollection.cs
- VectorCollectionConverter.cs
- basecomparevalidator.cs
- Timer.cs
- InternalPermissions.cs
- ScrollItemPattern.cs
- COM2ComponentEditor.cs
- EditorPart.cs
- EventProperty.cs
- SizeFConverter.cs
- SharedConnectionWorkflowTransactionService.cs
- EventLogger.cs
- SelectionManager.cs
- SqlNodeAnnotation.cs
- ButtonChrome.cs
- TransactionalPackage.cs
- ByteAnimationUsingKeyFrames.cs
- ResizeGrip.cs
- RecognizedAudio.cs
- CodeExpressionCollection.cs
- ObjectSelectorEditor.cs
- _OSSOCK.cs
- SqlRecordBuffer.cs
- WindowsFormsSynchronizationContext.cs
- XmlCollation.cs
- DeviceFiltersSection.cs
- BitHelper.cs
- IDataContractSurrogate.cs
- MessageDesigner.cs
- TypeElement.cs
- MsmqAppDomainProtocolHandler.cs
- DashStyle.cs
- CornerRadiusConverter.cs
- Parser.cs
- XPathNodeInfoAtom.cs
- ServiceThrottlingBehavior.cs
- NavigationWindowAutomationPeer.cs
- SubpageParagraph.cs
- HMACSHA1.cs
- QuaternionValueSerializer.cs
- BamlLocalizableResourceKey.cs
- ToolboxDataAttribute.cs
- NegatedCellConstant.cs
- MimeXmlReflector.cs
- panel.cs
- EdmToObjectNamespaceMap.cs
- _Rfc2616CacheValidators.cs
- DesignerDataTable.cs
- ArrayList.cs
- NamedElement.cs
- Encoding.cs
- ServiceHostingEnvironmentSection.cs
- FixedPageStructure.cs
- TextServicesProperty.cs
- DataGridBoolColumn.cs
- SortFieldComparer.cs
- DesignerOptionService.cs
- ClientData.cs
- ObjectListItemCollection.cs
- SqlConnectionPoolProviderInfo.cs
- MessageQueueAccessControlEntry.cs
- MaskedTextBoxDesigner.cs
- WindowsComboBox.cs
- IPGlobalProperties.cs
- CheckedListBox.cs