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
- File.cs
- QueryExpr.cs
- FilteredXmlReader.cs
- CrossContextChannel.cs
- DecimalAnimationBase.cs
- TaiwanLunisolarCalendar.cs
- WebPartConnectionsCloseVerb.cs
- QueryPageSettingsEventArgs.cs
- URLMembershipCondition.cs
- URLAttribute.cs
- AbstractExpressions.cs
- TypeConverterMarkupExtension.cs
- XmlProcessingInstruction.cs
- AutomationPropertyInfo.cs
- ArrayWithOffset.cs
- VideoDrawing.cs
- IntegrationExceptionEventArgs.cs
- XamlGridLengthSerializer.cs
- ComNativeDescriptor.cs
- C14NUtil.cs
- ArrowControl.xaml.cs
- PenLineJoinValidation.cs
- GroupStyle.cs
- PackageDigitalSignatureManager.cs
- IPEndPointCollection.cs
- DrawingBrush.cs
- SequentialActivityDesigner.cs
- DecimalKeyFrameCollection.cs
- DetailsViewPagerRow.cs
- XPathNavigatorReader.cs
- COAUTHINFO.cs
- UrlMappingsSection.cs
- SqlConnectionStringBuilder.cs
- ListControlConvertEventArgs.cs
- WebServiceFault.cs
- ControlUtil.cs
- Matrix3DValueSerializer.cs
- StyleCollectionEditor.cs
- DataGridViewEditingControlShowingEventArgs.cs
- DataGridTableCollection.cs
- HijriCalendar.cs
- JpegBitmapDecoder.cs
- UserMapPath.cs
- ContainerParaClient.cs
- PartialTrustVisibleAssembliesSection.cs
- StrokeNode.cs
- GridItem.cs
- ProofTokenCryptoHandle.cs
- GridViewRow.cs
- TemplateControl.cs
- SweepDirectionValidation.cs
- BeginStoryboard.cs
- ToolStripControlHost.cs
- AutoScrollExpandMessageFilter.cs
- TextSyndicationContentKindHelper.cs
- TreeViewItem.cs
- RoutedCommand.cs
- ToolBar.cs
- MergePropertyDescriptor.cs
- BinaryMethodMessage.cs
- StrokeNodeOperations2.cs
- PackWebRequest.cs
- ProtocolsConfigurationEntry.cs
- WindowsSysHeader.cs
- LambdaCompiler.cs
- Options.cs
- DeviceSpecificDialogCachedState.cs
- XmlAttribute.cs
- processwaithandle.cs
- UITypeEditor.cs
- DirectoryInfo.cs
- Emitter.cs
- MetabaseSettings.cs
- ColumnResizeUndoUnit.cs
- ToolStripDropDownClosingEventArgs.cs
- GridItemCollection.cs
- CalendarSelectionChangedEventArgs.cs
- ValidatorCompatibilityHelper.cs
- TextRangeEditLists.cs
- CodeBlockBuilder.cs
- NumericUpDownAcceleration.cs
- BaseAppDomainProtocolHandler.cs
- MsmqIntegrationElement.cs
- MobileTextWriter.cs
- ReadOnlyCollection.cs
- ImageListStreamer.cs
- MethodCallConverter.cs
- CompilationPass2TaskInternal.cs
- DataGridViewUtilities.cs
- ChildrenQuery.cs
- RequestCacheManager.cs
- WebBrowserNavigatingEventHandler.cs
- ImageField.cs
- ProvidePropertyAttribute.cs
- GridItem.cs
- XsltContext.cs
- _Win32.cs
- DbCommandDefinition.cs
- UrlPath.cs
- DataServiceConfiguration.cs