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
- WebConfigurationManager.cs
- InvokePattern.cs
- odbcmetadatacolumnnames.cs
- ColorTranslator.cs
- _ListenerResponseStream.cs
- DropDownList.cs
- InstanceContextMode.cs
- ByteConverter.cs
- FloatUtil.cs
- OleDbError.cs
- HealthMonitoringSection.cs
- CommandID.cs
- RowToParametersTransformer.cs
- AnimatedTypeHelpers.cs
- Expander.cs
- NativeMethods.cs
- CardSpaceException.cs
- PageHandlerFactory.cs
- AnimationTimeline.cs
- GenericsInstances.cs
- ConstructorBuilder.cs
- XmlDocumentFragment.cs
- TagMapInfo.cs
- TemplateControlBuildProvider.cs
- ResourceWriter.cs
- LabelEditEvent.cs
- BitmapFrameEncode.cs
- CollectionChangeEventArgs.cs
- OutputCacheSection.cs
- WindowsRebar.cs
- ColumnPropertiesGroup.cs
- ExpressionEditorAttribute.cs
- _AcceptOverlappedAsyncResult.cs
- WhitespaceSignificantCollectionAttribute.cs
- NativeMethods.cs
- SapiRecoInterop.cs
- SqlUtils.cs
- DataBoundLiteralControl.cs
- ProtocolsConfigurationEntry.cs
- CodeExpressionStatement.cs
- XmlConvert.cs
- View.cs
- MessageQueuePermissionEntryCollection.cs
- RemoteWebConfigurationHostStream.cs
- SerializationInfoEnumerator.cs
- EntitySetBaseCollection.cs
- BindUriHelper.cs
- Drawing.cs
- UnionExpr.cs
- CollectionBase.cs
- WriteFileContext.cs
- PageBorderless.cs
- Button.cs
- GenerateScriptTypeAttribute.cs
- NewArray.cs
- Utility.cs
- AppDomainUnloadedException.cs
- TypeNameConverter.cs
- TextServicesProperty.cs
- VectorKeyFrameCollection.cs
- NullExtension.cs
- elementinformation.cs
- XPathSelfQuery.cs
- SecurityContext.cs
- InputLanguageCollection.cs
- HitTestDrawingContextWalker.cs
- TopClause.cs
- TypeForwardedToAttribute.cs
- CompositeDataBoundControl.cs
- ListenDesigner.cs
- TakeQueryOptionExpression.cs
- PerformanceCounterPermission.cs
- GridErrorDlg.cs
- TextRangeProviderWrapper.cs
- BaseUriHelper.cs
- FontWeight.cs
- HtmlShim.cs
- SymbolEqualComparer.cs
- SimpleExpression.cs
- ConfigurationManagerHelper.cs
- UnitySerializationHolder.cs
- VoiceInfo.cs
- ParallelSeparator.xaml.cs
- EntitySet.cs
- WhitespaceRuleLookup.cs
- StateDesigner.cs
- SoapAttributes.cs
- Win32KeyboardDevice.cs
- XPathNavigator.cs
- ComplexLine.cs
- HttpFileCollection.cs
- RadioButtonPopupAdapter.cs
- FixedHyperLink.cs
- ActivityCompletionCallbackWrapper.cs
- DecimalAverageAggregationOperator.cs
- SingleAnimationUsingKeyFrames.cs
- SoapHelper.cs
- BufferBuilder.cs
- ExceptionAggregator.cs
- DelimitedListTraceListener.cs