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
- AutomationAttributeInfo.cs
- MsmqAppDomainProtocolHandler.cs
- TextSearch.cs
- ModuleConfigurationInfo.cs
- OutKeywords.cs
- NullableFloatAverageAggregationOperator.cs
- ToolStripSplitStackLayout.cs
- DesignerObject.cs
- SoapIgnoreAttribute.cs
- NonSerializedAttribute.cs
- IsolatedStorageFile.cs
- TokenBasedSet.cs
- RegexCode.cs
- ScrollProviderWrapper.cs
- QueryOperationResponseOfT.cs
- TypeProvider.cs
- DefaultProxySection.cs
- JoinTreeSlot.cs
- CheckedPointers.cs
- XmlTextReaderImplHelpers.cs
- CssStyleCollection.cs
- Completion.cs
- TabItem.cs
- WebPartManagerInternals.cs
- Empty.cs
- ExtendedPropertyCollection.cs
- X509RawDataKeyIdentifierClause.cs
- DataServices.cs
- PasswordTextContainer.cs
- DateTimePickerDesigner.cs
- CommandHelpers.cs
- RoutedEventConverter.cs
- SByteStorage.cs
- ValidationSummary.cs
- BookmarkNameHelper.cs
- ComboBoxRenderer.cs
- RenderingBiasValidation.cs
- AttributeParameterInfo.cs
- RepeatBehaviorConverter.cs
- PointConverter.cs
- OpenFileDialog.cs
- SqlConnectionPoolProviderInfo.cs
- Base64Decoder.cs
- FunctionParameter.cs
- ClientProtocol.cs
- GeneralTransform3DTo2D.cs
- DESCryptoServiceProvider.cs
- FillRuleValidation.cs
- SqlParameter.cs
- MDIWindowDialog.cs
- PersonalizationDictionary.cs
- GenericsInstances.cs
- ExitEventArgs.cs
- StringArrayConverter.cs
- DBSchemaRow.cs
- GenericTextProperties.cs
- HtmlElement.cs
- FileAuthorizationModule.cs
- CachedFontFamily.cs
- TimeSpan.cs
- SamlAssertion.cs
- BinaryConverter.cs
- SharedUtils.cs
- XmlEncodedRawTextWriter.cs
- MessageHeaderInfoTraceRecord.cs
- FormViewRow.cs
- Form.cs
- metadatamappinghashervisitor.cs
- XPathScanner.cs
- TableCellAutomationPeer.cs
- ArgumentsParser.cs
- TextEditorTables.cs
- RangeValuePatternIdentifiers.cs
- ClientSettingsProvider.cs
- PropertyToken.cs
- InlineUIContainer.cs
- FillBehavior.cs
- SamlSubjectStatement.cs
- CodeBinaryOperatorExpression.cs
- AppDomainAttributes.cs
- InvalidEnumArgumentException.cs
- AnnotationService.cs
- BitStream.cs
- Decimal.cs
- DeviceContexts.cs
- MetabaseServerConfig.cs
- DotExpr.cs
- DataGridColumn.cs
- CodeArrayIndexerExpression.cs
- DefaultHttpHandler.cs
- DataFormats.cs
- ConstNode.cs
- MetadataFile.cs
- XmlWrappingWriter.cs
- ParameterCollection.cs
- PingOptions.cs
- ManagedIStream.cs
- mactripleDES.cs
- LogicalExpr.cs
- PackageDigitalSignatureManager.cs