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
- DataGridViewComboBoxEditingControl.cs
- TimeBoundedCache.cs
- FormViewDeletedEventArgs.cs
- AQNBuilder.cs
- AnonymousIdentificationSection.cs
- DefaultTextStoreTextComposition.cs
- ImportedNamespaceContextItem.cs
- AssemblyAssociatedContentFileAttribute.cs
- CommandEventArgs.cs
- StylusPointPropertyInfo.cs
- CaseDesigner.xaml.cs
- BuildProvidersCompiler.cs
- PaperSource.cs
- DataTransferEventArgs.cs
- ApplicationActivator.cs
- QilInvokeEarlyBound.cs
- TargetParameterCountException.cs
- ImportContext.cs
- TypeSystemProvider.cs
- ConfigXmlWhitespace.cs
- SQLChars.cs
- GeometryHitTestResult.cs
- XmlBinaryReader.cs
- BinarySerializer.cs
- MetabaseServerConfig.cs
- ExpressionsCollectionConverter.cs
- SettingsPropertyWrongTypeException.cs
- securitycriticaldataClass.cs
- RelationshipFixer.cs
- MemberPath.cs
- WebPartHelpVerb.cs
- APCustomTypeDescriptor.cs
- GridViewDeleteEventArgs.cs
- RegexCapture.cs
- CollectionBase.cs
- SoapCodeExporter.cs
- TemplatingOptionsDialog.cs
- _FtpDataStream.cs
- RuntimeIdentifierPropertyAttribute.cs
- Models.cs
- MouseActionValueSerializer.cs
- CryptoConfig.cs
- oledbmetadatacollectionnames.cs
- TableRowsCollectionEditor.cs
- CqlBlock.cs
- OpenFileDialog.cs
- IChannel.cs
- WebPartsPersonalization.cs
- TextEvent.cs
- HtmlTextBoxAdapter.cs
- StorageSetMapping.cs
- DependencyObject.cs
- Variant.cs
- DocumentGridContextMenu.cs
- WorkflowRequestContext.cs
- Rules.cs
- TransformDescriptor.cs
- DesignerValidationSummaryAdapter.cs
- ErrorRuntimeConfig.cs
- CipherData.cs
- WindowsScroll.cs
- CharKeyFrameCollection.cs
- Stackframe.cs
- InstanceData.cs
- DataFieldConverter.cs
- Queue.cs
- DbConnectionStringCommon.cs
- TransformProviderWrapper.cs
- UnsafeNativeMethodsCLR.cs
- PasswordTextContainer.cs
- VirtualPathUtility.cs
- TypeGeneratedEventArgs.cs
- BoundConstants.cs
- EventManager.cs
- NameTable.cs
- PrivacyNoticeElement.cs
- DataBinder.cs
- ComponentDispatcher.cs
- SoapCodeExporter.cs
- CellParagraph.cs
- GeometryHitTestParameters.cs
- HideDisabledControlAdapter.cs
- BinaryMethodMessage.cs
- Animatable.cs
- SqlDeflator.cs
- OleDbErrorCollection.cs
- TypeConverterHelper.cs
- FixedPosition.cs
- ReferenceTypeElement.cs
- WeakReferenceEnumerator.cs
- StyleCollectionEditor.cs
- JsonQueryStringConverter.cs
- RuntimeWrappedException.cs
- DbParameterCollection.cs
- TextWriter.cs
- BaseAsyncResult.cs
- FrameworkTemplate.cs
- StoreContentChangedEventArgs.cs
- EncryptedKeyIdentifierClause.cs
- DataControlFieldCollection.cs