Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Activities / LocalService / FollowerQueueCreator.cs / 1305376 / FollowerQueueCreator.cs
#region Using directives using System; using System.Diagnostics; using System.Collections.Generic; using System.Collections; using System.Reflection; using System.Runtime.Serialization; using System.Workflow.ComponentModel; using System.Workflow.Runtime; using System.Workflow.Runtime.Hosting; using System.Runtime.Remoting.Messaging; #endregion namespace System.Workflow.Activities { [Serializable] internal sealed class FollowerQueueCreator : IActivityEventListener{ string followerOperation; object [....] = new object(); internal FollowerQueueCreator(string operation) { this.followerOperation = operation; } public override bool Equals(object obj) { if (obj == null) return false; FollowerQueueCreator equalsObject = obj as FollowerQueueCreator; if (this.followerOperation == equalsObject.followerOperation) return true; return false; } public override int GetHashCode() { return this.followerOperation.GetHashCode(); } #region IActivityEventListener Members void IActivityEventListener .OnEvent(object sender, QueueEventArgs args) { lock ([....]) { WorkflowQueue queue = (WorkflowQueue)sender; // create the queue after extracting the correlation values from the message EventQueueName staticId = (EventQueueName)queue.QueueName; WorkflowActivityTrace.Activity.TraceEvent(TraceEventType.Information, 0, "FollowerQueueCreator: initialized on operation {0} for follower {1}", staticId.InterfaceType.Name + staticId.MethodName, this.followerOperation); IMethodMessage message = queue.Peek() as IMethodMessage; ICollection corrValues = CorrelationResolver.ResolveCorrelationValues(staticId.InterfaceType, staticId.MethodName, message.Args, false); EventQueueName queueName = new EventQueueName(staticId.InterfaceType, this.followerOperation, corrValues); if (!queue.QueuingService.Exists(queueName)) { WorkflowActivityTrace.Activity.TraceEvent(TraceEventType.Information, 0, "FollowerQueueCreator::CreateQueue creating q {0}", queueName.GetHashCode()); queue.QueuingService.CreateWorkflowQueue(queueName, true); } } } #endregion } } // 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
- WpfWebRequestHelper.cs
- ReadOnlyAttribute.cs
- PolicyDesigner.cs
- InternalBufferManager.cs
- CustomErrorCollection.cs
- ClassHandlersStore.cs
- SpellerInterop.cs
- TypeDescriptionProvider.cs
- BufferedStream.cs
- DataGridCellsPresenter.cs
- DesignerImageAdapter.cs
- DesignTimeVisibleAttribute.cs
- UnsignedPublishLicense.cs
- ContextProperty.cs
- ClassicBorderDecorator.cs
- NativeStructs.cs
- XmlCodeExporter.cs
- RectangleGeometry.cs
- LabelEditEvent.cs
- AttachedPropertyMethodSelector.cs
- SerializationInfoEnumerator.cs
- CodeDirectoryCompiler.cs
- Cursor.cs
- ApplicationContext.cs
- SqlProviderServices.cs
- PersonalizationAdministration.cs
- MDIControlStrip.cs
- InputBindingCollection.cs
- SplineKeyFrames.cs
- PackWebResponse.cs
- SizeAnimationUsingKeyFrames.cs
- InlinedAggregationOperator.cs
- SemaphoreSecurity.cs
- WebPartConnectionsDisconnectVerb.cs
- DataGridViewColumnDesigner.cs
- XmlMapping.cs
- ProtectedProviderSettings.cs
- DataSourceXmlAttributeAttribute.cs
- XhtmlConformanceSection.cs
- VisualTarget.cs
- WebPartEventArgs.cs
- ServiceOperationHelpers.cs
- ImplicitInputBrush.cs
- WebPageTraceListener.cs
- DatasetMethodGenerator.cs
- cookiecontainer.cs
- FamilyMap.cs
- UserControlFileEditor.cs
- XmlElementCollection.cs
- SynchronizationLockException.cs
- BitmapEffect.cs
- SystemWebCachingSectionGroup.cs
- Size.cs
- CompilationPass2TaskInternal.cs
- DataGridViewColumnStateChangedEventArgs.cs
- SQLResource.cs
- VersionConverter.cs
- StackSpiller.Bindings.cs
- AsyncOperation.cs
- Propagator.JoinPropagator.cs
- InfoCardRSACryptoProvider.cs
- AndMessageFilter.cs
- typedescriptorpermissionattribute.cs
- OleDbFactory.cs
- _CookieModule.cs
- RequiredArgumentAttribute.cs
- TypeCodeDomSerializer.cs
- DispatcherObject.cs
- SingleAnimationBase.cs
- SHA256Managed.cs
- ValidatedControlConverter.cs
- WarningException.cs
- Control.cs
- ValueUtilsSmi.cs
- HeaderedItemsControl.cs
- MaterialGroup.cs
- HtmlInputControl.cs
- LinkConverter.cs
- wgx_exports.cs
- FixedLineResult.cs
- Encoder.cs
- ScrollProviderWrapper.cs
- RichTextBox.cs
- DesignerDataSchemaClass.cs
- DetailsViewCommandEventArgs.cs
- AspNetSynchronizationContext.cs
- EndpointInfoCollection.cs
- Win32Exception.cs
- MaskedTextProvider.cs
- Region.cs
- MailBnfHelper.cs
- SpeechSeg.cs
- SystemThemeKey.cs
- DefaultShape.cs
- XmlValidatingReader.cs
- MultiPropertyDescriptorGridEntry.cs
- SemanticResolver.cs
- Size.cs
- IIS7UserPrincipal.cs
- OperationValidationEventArgs.cs