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
- SqlNotificationRequest.cs
- DbMetaDataColumnNames.cs
- WebEncodingValidatorAttribute.cs
- GridViewColumnHeader.cs
- Label.cs
- SegmentInfo.cs
- EditingMode.cs
- NonVisualControlAttribute.cs
- ListBoxItemWrapperAutomationPeer.cs
- TreeNodeStyle.cs
- XmlSchemaSimpleContentRestriction.cs
- ipaddressinformationcollection.cs
- ToolStripDropDownItem.cs
- SafeProcessHandle.cs
- PeerNearMe.cs
- InplaceBitmapMetadataWriter.cs
- TextProperties.cs
- ParserExtension.cs
- SqlUserDefinedAggregateAttribute.cs
- SQLStringStorage.cs
- Utils.cs
- CmsUtils.cs
- TableLayoutSettingsTypeConverter.cs
- FormViewModeEventArgs.cs
- Matrix3DStack.cs
- SkipQueryOptionExpression.cs
- ExpressionList.cs
- TypeLoadException.cs
- BlurBitmapEffect.cs
- EncoderParameter.cs
- XmlDeclaration.cs
- DispatcherHookEventArgs.cs
- ICollection.cs
- RecognizerBase.cs
- WSSecureConversationFeb2005.cs
- TypeConverterBase.cs
- HostProtectionPermission.cs
- OlePropertyStructs.cs
- ChangeTracker.cs
- OutputCacheSettings.cs
- GreenMethods.cs
- VerticalAlignConverter.cs
- OracleCommandBuilder.cs
- FrameworkTextComposition.cs
- RelatedView.cs
- PauseStoryboard.cs
- IntegerValidatorAttribute.cs
- EditorPart.cs
- Gdiplus.cs
- RegionInfo.cs
- FragmentNavigationEventArgs.cs
- SimpleType.cs
- AssemblyAttributes.cs
- Int64Storage.cs
- DCSafeHandle.cs
- GradientStop.cs
- Token.cs
- SByteStorage.cs
- RowParagraph.cs
- XamlStyleSerializer.cs
- WbemProvider.cs
- CDSsyncETWBCLProvider.cs
- WebPartVerb.cs
- RowTypeElement.cs
- DbConnectionStringCommon.cs
- LayoutDump.cs
- ToolStripTextBox.cs
- ConfigurationStrings.cs
- StylusEventArgs.cs
- FlowLayoutPanel.cs
- WebPartMenu.cs
- RubberbandSelector.cs
- TemplateControlCodeDomTreeGenerator.cs
- RowType.cs
- FixedSOMTextRun.cs
- GlyphsSerializer.cs
- EnumType.cs
- SearchForVirtualItemEventArgs.cs
- NotConverter.cs
- CollectionConverter.cs
- SchemaImporterExtensionElementCollection.cs
- DateTimePickerDesigner.cs
- RoutedEventArgs.cs
- FolderBrowserDialog.cs
- IdnMapping.cs
- PiiTraceSource.cs
- XmlSerializerSection.cs
- DataGridViewRow.cs
- SharedStatics.cs
- ResourceReferenceExpression.cs
- NavigationEventArgs.cs
- ExpressionBuilder.cs
- WaitForChangedResult.cs
- _Events.cs
- ResetableIterator.cs
- DataListItemCollection.cs
- _UncName.cs
- DivideByZeroException.cs
- ComponentManagerBroker.cs
- CellParagraph.cs