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
- ToolStripComboBox.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- GuidTagList.cs
- OrderedDictionary.cs
- PassportAuthenticationModule.cs
- SqlDataSource.cs
- GridView.cs
- DataTableExtensions.cs
- MessageSecurityOverHttp.cs
- basevalidator.cs
- LocalizationParserHooks.cs
- WmlCommandAdapter.cs
- Size3DValueSerializer.cs
- MediaContext.cs
- Size.cs
- TrustSection.cs
- PointAnimation.cs
- MemberAccessException.cs
- GraphicsPath.cs
- RemoteWebConfigurationHostStream.cs
- OleDbWrapper.cs
- ParserStreamGeometryContext.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- XmlChoiceIdentifierAttribute.cs
- WebPartZoneBaseDesigner.cs
- BlurBitmapEffect.cs
- ValidationSummary.cs
- ProfileEventArgs.cs
- CodeMemberProperty.cs
- LocalBuilder.cs
- Stopwatch.cs
- COM2TypeInfoProcessor.cs
- InfoCardSymmetricAlgorithm.cs
- ToolStripHighContrastRenderer.cs
- FontNamesConverter.cs
- SrgsGrammarCompiler.cs
- CmsUtils.cs
- ProtocolsConfigurationHandler.cs
- QueryableDataSource.cs
- EndEvent.cs
- OleDbDataReader.cs
- BoolExpressionVisitors.cs
- XPathNodeList.cs
- cryptoapiTransform.cs
- OracleConnectionStringBuilder.cs
- FloatSumAggregationOperator.cs
- IntegerCollectionEditor.cs
- SHA512.cs
- ClientSettingsStore.cs
- ConfigXmlWhitespace.cs
- SqlConnectionFactory.cs
- Overlapped.cs
- HttpCacheVaryByContentEncodings.cs
- GlyphsSerializer.cs
- GlyphingCache.cs
- ImageClickEventArgs.cs
- FeatureSupport.cs
- GeometryGroup.cs
- TypefaceMap.cs
- UpdateExpressionVisitor.cs
- hresults.cs
- XmlDocumentType.cs
- InvalidPrinterException.cs
- Vector3DValueSerializer.cs
- FormViewCommandEventArgs.cs
- InternalResources.cs
- Int32EqualityComparer.cs
- InertiaRotationBehavior.cs
- Int32CollectionConverter.cs
- CodeGenerator.cs
- XmlSchemaInfo.cs
- ItemCheckEvent.cs
- InkCanvasSelectionAdorner.cs
- DefaultProxySection.cs
- WorkflowDefinitionDispenser.cs
- RolePrincipal.cs
- CaretElement.cs
- AsymmetricAlgorithm.cs
- LoadMessageLogger.cs
- ParserExtension.cs
- Path.cs
- ProfileGroupSettings.cs
- RegexTree.cs
- XhtmlBasicTextViewAdapter.cs
- AttributeQuery.cs
- XmlSchemaObjectTable.cs
- XmlAttributeCollection.cs
- InputLanguageEventArgs.cs
- TiffBitmapDecoder.cs
- indexingfiltermarshaler.cs
- ObjectAnimationBase.cs
- SoapObjectWriter.cs
- EntityParameterCollection.cs
- ActivityCodeDomReferenceService.cs
- LateBoundBitmapDecoder.cs
- ComponentDispatcher.cs
- MaterialGroup.cs
- Table.cs
- GeneralTransformCollection.cs
- DesignerToolboxInfo.cs