Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / SMSvcHost / System / ServiceModel / Activation / AppAction.cs / 1 / AppAction.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Activation { using System; using System.Collections.Generic; enum AppActionType { // An App is deleted Deleted, // Binding, or AppPool, or RequestsBlocked is changed SettingsChanged } class AppAction { AppActionType actionType; string path; string appPoolId; NullablerequestsBlocked; string[] bindings; AppAction(AppActionType actionType) { this.actionType = actionType; } public static AppAction CreateDeletedAction() { return new AppAction(AppActionType.Deleted); } public static AppAction CreateBindingsChangedAction(string[] bindings) { AppAction action = new AppAction(AppActionType.SettingsChanged); action.bindings = bindings; return action; } public static AppAction CreateAppPoolChangedAction(string appPoolId) { AppAction action = new AppAction(AppActionType.SettingsChanged); action.appPoolId = appPoolId; return action; } public AppActionType ActionType { get { return this.actionType; } } public string Path { get { return this.path; } } public string AppPoolId { get { return this.appPoolId; } } public string[] Bindings { get { return this.bindings; } } public Nullable RequestsBlocked { get { return this.requestsBlocked; } } public void MergeFromCreatedAction(string path, int siteId, string appPoolId, bool requestsBlocked, string[] bindings) { DiagnosticUtility.DebugAssert(this.ActionType == AppActionType.Deleted, "We should get ApplicationCreated notification only when the App is to be deleted."); // Delete + Created = SettingsChanged this.actionType = AppActionType.SettingsChanged; SetSettings(path, appPoolId, requestsBlocked, bindings); // SiteId is ignored because the siteId can't be changed for the same appKey. } public void MergeFromDeletedAction() { DiagnosticUtility.DebugAssert(this.ActionType == AppActionType.SettingsChanged, "We should not get two consecutive ApplicationDeleted notifications."); this.actionType = AppActionType.Deleted; } public void MergeFromBindingChangedAction(string[] bindings) { DiagnosticUtility.DebugAssert(this.ActionType == AppActionType.SettingsChanged, "We should not get two consecutive ApplicationDeleted notifications."); this.bindings = bindings; } public void MergeFromAppPoolChangedAction(string appPoolId) { DiagnosticUtility.DebugAssert(this.ActionType == AppActionType.SettingsChanged, "We should not get two consecutive ApplicationDeleted notifications."); this.appPoolId = appPoolId; } public void MergeFromRequestsBlockedAction(bool requestsBlocked) { DiagnosticUtility.DebugAssert(this.ActionType == AppActionType.SettingsChanged, "We should not get two consecutive ApplicationDeleted notifications."); this.requestsBlocked = requestsBlocked; } void SetSettings(string path, string appPoolId, bool requestsBlocked, string[] bindings) { this.path = path; this.appPoolId = appPoolId; this.requestsBlocked = requestsBlocked; this.bindings = bindings; } } } // 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
- DecoderNLS.cs
- ToolbarAUtomationPeer.cs
- CodePropertyReferenceExpression.cs
- ZoneButton.cs
- EventManager.cs
- ConstNode.cs
- InternalPolicyElement.cs
- SqlNotificationEventArgs.cs
- KeyEventArgs.cs
- DataBindEngine.cs
- EntityDataSourceReferenceGroup.cs
- FixedSOMPage.cs
- Point3DAnimationBase.cs
- HwndHostAutomationPeer.cs
- ChainOfResponsibility.cs
- DataGridViewRowCollection.cs
- RequestCacheValidator.cs
- Config.cs
- ExceptQueryOperator.cs
- FtpRequestCacheValidator.cs
- BitmapSource.cs
- TableCellCollection.cs
- DbProviderManifest.cs
- EventToken.cs
- UserControlCodeDomTreeGenerator.cs
- BitStack.cs
- ObjectDataSourceStatusEventArgs.cs
- CompilationUnit.cs
- ToolStripSystemRenderer.cs
- SelectionList.cs
- DateTimeConverter2.cs
- PnrpPeerResolver.cs
- HiddenField.cs
- WriteableOnDemandPackagePart.cs
- NativeMethodsCLR.cs
- GridViewDesigner.cs
- MailMessage.cs
- HostingEnvironmentSection.cs
- UpdateManifestForBrowserApplication.cs
- SelectionWordBreaker.cs
- TabControl.cs
- XmlWhitespace.cs
- Win32Native.cs
- TypeLibraryHelper.cs
- DockPatternIdentifiers.cs
- ChangePassword.cs
- SizeAnimation.cs
- Int32Rect.cs
- StrokeDescriptor.cs
- HttpDictionary.cs
- odbcmetadatacolumnnames.cs
- MarginsConverter.cs
- ListBindingConverter.cs
- BufferAllocator.cs
- BufferedGraphicsManager.cs
- Match.cs
- BaseDataBoundControlDesigner.cs
- DispatcherSynchronizationContext.cs
- WindowsPen.cs
- MessageSmuggler.cs
- ConfigurationStrings.cs
- BitmapEffectDrawing.cs
- TypedTableBaseExtensions.cs
- AmbientLight.cs
- StrongNameKeyPair.cs
- SpeechEvent.cs
- XmlSchemaInclude.cs
- WrappedKeySecurityTokenParameters.cs
- AdapterDictionary.cs
- DBBindings.cs
- TokenFactoryBase.cs
- ExpressionLexer.cs
- SQLGuidStorage.cs
- Expressions.cs
- Peer.cs
- Main.cs
- PerformanceCountersElement.cs
- RadioButtonAutomationPeer.cs
- PointHitTestParameters.cs
- RangeBaseAutomationPeer.cs
- Propagator.JoinPropagator.cs
- ProxyWebPartConnectionCollection.cs
- DefaultAssemblyResolver.cs
- MimeXmlReflector.cs
- ArrayList.cs
- EmptyReadOnlyDictionaryInternal.cs
- WbmpConverter.cs
- BinaryMessageEncodingBindingElement.cs
- CodeMemberField.cs
- VScrollBar.cs
- WebEncodingValidatorAttribute.cs
- TdsParserSessionPool.cs
- UnsafeNativeMethods.cs
- StateMachineWorkflow.cs
- NameService.cs
- ApplicationManager.cs
- TypeUnloadedException.cs
- XmlSiteMapProvider.cs
- mansign.cs
- TdsRecordBufferSetter.cs