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
- ExpressionBuilderCollection.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- EventTrigger.cs
- InputGestureCollection.cs
- X509Utils.cs
- RectangleF.cs
- XmlIterators.cs
- HandlerBase.cs
- DataRelationPropertyDescriptor.cs
- Token.cs
- FormatControl.cs
- ScriptResourceInfo.cs
- AutomationPeer.cs
- ListControlConvertEventArgs.cs
- RoutedEvent.cs
- InternalDispatchObject.cs
- ConstraintStruct.cs
- MetadataCache.cs
- RotateTransform3D.cs
- SourceElementsCollection.cs
- WebBodyFormatMessageProperty.cs
- HttpListenerContext.cs
- Int64AnimationBase.cs
- TextTreeTextElementNode.cs
- InvalidPrinterException.cs
- RsaSecurityTokenAuthenticator.cs
- FederatedMessageSecurityOverHttpElement.cs
- DocumentViewerHelper.cs
- SoapSchemaExporter.cs
- DocumentViewerHelper.cs
- PropertyDescriptorGridEntry.cs
- SupportingTokenAuthenticatorSpecification.cs
- PerformanceCounter.cs
- DataFormats.cs
- Visitor.cs
- CodeCommentStatement.cs
- Utils.cs
- MethodCallTranslator.cs
- CompletionProxy.cs
- Content.cs
- SuppressMergeCheckAttribute.cs
- Encoding.cs
- OwnerDrawPropertyBag.cs
- RegexGroupCollection.cs
- Base64Decoder.cs
- SqlDataSourceTableQuery.cs
- HttpResponseHeader.cs
- OledbConnectionStringbuilder.cs
- HandlerBase.cs
- DateTimePicker.cs
- ClientBuildManagerCallback.cs
- WebPageTraceListener.cs
- TimeSpanConverter.cs
- OrderByBuilder.cs
- DataGridViewDataErrorEventArgs.cs
- XmlParserContext.cs
- InputMethodStateTypeInfo.cs
- ControlParameter.cs
- ELinqQueryState.cs
- ConfigurationCollectionAttribute.cs
- SecurityCriticalDataForSet.cs
- HGlobalSafeHandle.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- Internal.cs
- BooleanStorage.cs
- InternalsVisibleToAttribute.cs
- PeerResolver.cs
- TaskFactory.cs
- PropertyItem.cs
- DeferredElementTreeState.cs
- GridViewSortEventArgs.cs
- MenuTracker.cs
- FontFamily.cs
- FormsAuthenticationUserCollection.cs
- ListViewInsertEventArgs.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- HMACSHA512.cs
- RemotingConfigParser.cs
- ReadOnlyNameValueCollection.cs
- HtmlTableRowCollection.cs
- XmlObjectSerializerReadContextComplexJson.cs
- Formatter.cs
- Keyboard.cs
- RegexCharClass.cs
- PersonalizableTypeEntry.cs
- EdgeProfileValidation.cs
- WebPartAuthorizationEventArgs.cs
- TextTreeText.cs
- GlyphingCache.cs
- PerformanceCounterScope.cs
- ResourceWriter.cs
- HMACSHA1.cs
- ValidationEventArgs.cs
- Range.cs
- InkCanvas.cs
- Convert.cs
- TreeViewDesigner.cs
- HtmlWindow.cs
- MappingMetadataHelper.cs
- ServiceHostingEnvironment.cs