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
- NullRuntimeConfig.cs
- NativeCompoundFileAPIs.cs
- CacheOutputQuery.cs
- PropertyIDSet.cs
- NameNode.cs
- ExtractedStateEntry.cs
- PasswordBox.cs
- ExitEventArgs.cs
- ObjectKeyFrameCollection.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ClientApiGenerator.cs
- InputScopeAttribute.cs
- ResXResourceReader.cs
- FillRuleValidation.cs
- ZoomingMessageFilter.cs
- AncillaryOps.cs
- ItemCheckEvent.cs
- LocalizedNameDescriptionPair.cs
- ScrollData.cs
- ClassHandlersStore.cs
- SiteMapPath.cs
- CompensatableTransactionScopeActivity.cs
- UnsafeNativeMethods.cs
- SoapInteropTypes.cs
- AsnEncodedData.cs
- BridgeDataRecord.cs
- EntitySet.cs
- XPathNavigatorReader.cs
- DocumentOrderQuery.cs
- WeakReferenceKey.cs
- SynchronousChannel.cs
- WindowsListViewItem.cs
- InvalidCastException.cs
- FormViewDeletedEventArgs.cs
- WCFBuildProvider.cs
- XmlValueConverter.cs
- panel.cs
- ClientApiGenerator.cs
- ModelVisual3D.cs
- CodeGenerator.cs
- PanelStyle.cs
- WebPartDisplayModeCollection.cs
- MailSettingsSection.cs
- ObjectViewQueryResultData.cs
- ErrorInfoXmlDocument.cs
- IsolatedStorageException.cs
- OleDbEnumerator.cs
- MobileControlDesigner.cs
- MsiStyleLogWriter.cs
- PenLineCapValidation.cs
- FixedSOMElement.cs
- SqlDependencyUtils.cs
- SystemFonts.cs
- CultureInfo.cs
- ByteConverter.cs
- UpdateExpressionVisitor.cs
- ContentTextAutomationPeer.cs
- TracedNativeMethods.cs
- BitmapSource.cs
- ComNativeDescriptor.cs
- EditorZoneBase.cs
- FuncCompletionCallbackWrapper.cs
- SoapFormatter.cs
- SHA256.cs
- WorkflowIdleElement.cs
- Transform.cs
- LineServices.cs
- OutputCacheProfile.cs
- FileNameEditor.cs
- SqlSelectClauseBuilder.cs
- Win32.cs
- SqlFunctionAttribute.cs
- XsltLibrary.cs
- DependencyPropertyKind.cs
- Dispatcher.cs
- SqlClientWrapperSmiStream.cs
- MemoryFailPoint.cs
- HttpHandlerActionCollection.cs
- XPathEmptyIterator.cs
- XsltArgumentList.cs
- DecoderExceptionFallback.cs
- StrokeNodeOperations2.cs
- ComplexBindingPropertiesAttribute.cs
- ToolStripArrowRenderEventArgs.cs
- VersionedStream.cs
- PageContent.cs
- LongSumAggregationOperator.cs
- QilNode.cs
- RepeatInfo.cs
- MetadataArtifactLoader.cs
- DynamicArgumentDesigner.xaml.cs
- BitStack.cs
- WinFormsUtils.cs
- WebPartConnectionsCancelEventArgs.cs
- MsmqBindingBase.cs
- ADConnectionHelper.cs
- Model3D.cs
- DefaultTextStore.cs
- AssemblyInfo.cs
- LambdaCompiler.Generated.cs