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
- ExtendedProtectionPolicy.cs
- HostedElements.cs
- NameValuePair.cs
- ExpanderAutomationPeer.cs
- AuthenticationService.cs
- TypeLibConverter.cs
- DbDataReader.cs
- State.cs
- InternalConfigConfigurationFactory.cs
- DbProviderFactories.cs
- ShaderEffect.cs
- NoClickablePointException.cs
- XmlSchemaImporter.cs
- Utils.cs
- StructuralCache.cs
- WebCategoryAttribute.cs
- KnowledgeBase.cs
- DataMisalignedException.cs
- XamlBuildProvider.cs
- UniformGrid.cs
- TextShapeableCharacters.cs
- LocationUpdates.cs
- DataGridViewAutoSizeModeEventArgs.cs
- CodeTypeMemberCollection.cs
- BamlResourceSerializer.cs
- FontFamilyValueSerializer.cs
- StaticResourceExtension.cs
- EnumType.cs
- ConstraintManager.cs
- commandenforcer.cs
- JsonQNameDataContract.cs
- SecurityUniqueId.cs
- EncodingNLS.cs
- FolderLevelBuildProvider.cs
- ProvidersHelper.cs
- HtmlShimManager.cs
- WindowsTooltip.cs
- IncrementalHitTester.cs
- DriveInfo.cs
- PrincipalPermission.cs
- XmlIgnoreAttribute.cs
- DataSetMappper.cs
- SiteMapNodeItemEventArgs.cs
- DesignerAdapterAttribute.cs
- DataGridViewElement.cs
- Rfc2898DeriveBytes.cs
- RayHitTestParameters.cs
- Itemizer.cs
- XmlSignatureProperties.cs
- SimpleHandlerBuildProvider.cs
- CompareInfo.cs
- ObjRef.cs
- UnsafeNetInfoNativeMethods.cs
- SmtpAuthenticationManager.cs
- GZipDecoder.cs
- _NegoState.cs
- TrackingRecord.cs
- DesignerSerializerAttribute.cs
- LookupBindingPropertiesAttribute.cs
- WebServiceReceive.cs
- TagMapCollection.cs
- DelimitedListTraceListener.cs
- HtmlGenericControl.cs
- CodeSnippetCompileUnit.cs
- DBConnection.cs
- DecimalAnimation.cs
- ErrorFormatter.cs
- XmlSchema.cs
- MembershipPasswordException.cs
- FloaterBaseParaClient.cs
- BoundPropertyEntry.cs
- XPathNode.cs
- ResourcePool.cs
- ColumnCollection.cs
- Ray3DHitTestResult.cs
- CacheEntry.cs
- GridViewColumnHeaderAutomationPeer.cs
- AbstractSvcMapFileLoader.cs
- MenuItemBindingCollection.cs
- BidOverLoads.cs
- Camera.cs
- ThreadPool.cs
- ProcessModelSection.cs
- SimpleHandlerBuildProvider.cs
- DBSchemaTable.cs
- DeriveBytes.cs
- RestHandlerFactory.cs
- SqlErrorCollection.cs
- DoubleAnimation.cs
- wmiprovider.cs
- FloatUtil.cs
- wgx_render.cs
- ProgressChangedEventArgs.cs
- InternalConfigHost.cs
- BitmapEffect.cs
- RegistrationServices.cs
- Missing.cs
- SecurityPermission.cs
- DataSet.cs
- TextDecorationCollection.cs