Code:
/ 4.0 / 4.0 / 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. #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
- RNGCryptoServiceProvider.cs
- XmlPreloadedResolver.cs
- HijriCalendar.cs
- FullTrustAssembly.cs
- ContextStaticAttribute.cs
- ImageMetadata.cs
- PerformanceCounterPermissionEntryCollection.cs
- TailCallAnalyzer.cs
- MappingException.cs
- ModifiableIteratorCollection.cs
- BitmapMetadata.cs
- ChangeBlockUndoRecord.cs
- RegisteredExpandoAttribute.cs
- ExpressionBuilder.cs
- TextRunCacheImp.cs
- SignatureDescription.cs
- HttpConfigurationContext.cs
- PrtCap_Public_Simple.cs
- SrgsText.cs
- ProvidersHelper.cs
- Overlapped.cs
- ContextMenuService.cs
- TryExpression.cs
- HierarchicalDataSourceControl.cs
- XmlCharCheckingWriter.cs
- Command.cs
- XmlTextReaderImplHelpers.cs
- DSACryptoServiceProvider.cs
- Crypto.cs
- ServiceObjectContainer.cs
- StrongTypingException.cs
- ImageDrawing.cs
- LinearGradientBrush.cs
- ListDictionary.cs
- ParseHttpDate.cs
- Geometry.cs
- DashStyles.cs
- AdPostCacheSubstitution.cs
- SystemIPv4InterfaceProperties.cs
- QuadraticBezierSegment.cs
- DiagnosticTrace.cs
- FreezableCollection.cs
- DataIdProcessor.cs
- MediaTimeline.cs
- Span.cs
- Transform3D.cs
- ComAwareEventInfo.cs
- ContextMenu.cs
- BindingWorker.cs
- XmlNavigatorFilter.cs
- DataBindingHandlerAttribute.cs
- OleDbReferenceCollection.cs
- EventlogProvider.cs
- StateDesignerConnector.cs
- DirectoryObjectSecurity.cs
- StylusOverProperty.cs
- BadImageFormatException.cs
- DataServiceStreamResponse.cs
- IntranetCredentialPolicy.cs
- CacheVirtualItemsEvent.cs
- WasAdminWrapper.cs
- XmlSchemaComplexType.cs
- DesignerTextBoxAdapter.cs
- TextOnlyOutput.cs
- BitStream.cs
- Pkcs9Attribute.cs
- AuthenticatingEventArgs.cs
- ChameleonKey.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ImageKeyConverter.cs
- ArrayConverter.cs
- SQLDoubleStorage.cs
- PathFigureCollection.cs
- UnmanagedMemoryStream.cs
- WebBrowserNavigatedEventHandler.cs
- CommandBindingCollection.cs
- WebPartConnectVerb.cs
- XPathNodeList.cs
- CodePrimitiveExpression.cs
- ValidationHelper.cs
- XPathNavigator.cs
- LockCookie.cs
- PeerDefaultCustomResolverClient.cs
- UInt32Storage.cs
- AsyncResult.cs
- CalendarDayButton.cs
- ResolveDuplex11AsyncResult.cs
- GroupBoxRenderer.cs
- SchemaNames.cs
- XmlWellformedWriter.cs
- BindToObject.cs
- NamedElement.cs
- Label.cs
- FormViewModeEventArgs.cs
- ProfileInfo.cs
- Font.cs
- PropertyToken.cs
- HitTestWithPointDrawingContextWalker.cs
- XmlTextReader.cs
- RegexNode.cs