Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Helpers.cs / 1305376 / Helpers.cs
namespace System.Workflow.ComponentModel { using System; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.CodeDom; using System.Workflow.ComponentModel.Design; using System.Diagnostics; using System.Reflection; internal static class InternalHelpers { // Should only be called for BuiltIn activities internal static string GenerateQualifiedNameForLockedActivity(Activity activity, string id) { System.Text.StringBuilder sbQId = new System.Text.StringBuilder(); // Walk up the parent chain to find the custom activity that contains this built-in activity // and prepend the ID of the custom activity to the front of the qualified ID of this activity. Debug.Assert(activity.Parent != null, "If this is a built-in activity, its parent should never be null."); string newID = (string.IsNullOrEmpty(id)) ? activity.Name : id; CompositeActivity customActivity = Helpers.GetDeclaringActivity(activity); if (customActivity != null) // sbQId.Append(customActivity.QualifiedName).Append(".").Append(newID); else sbQId.Append(newID); return sbQId.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.ComponentModel { using System; using System.Collections; using System.Collections.Specialized; using System.Collections.Generic; using System.CodeDom; using System.Workflow.ComponentModel.Design; using System.Diagnostics; using System.Reflection; internal static class InternalHelpers { // Should only be called for BuiltIn activities internal static string GenerateQualifiedNameForLockedActivity(Activity activity, string id) { System.Text.StringBuilder sbQId = new System.Text.StringBuilder(); // Walk up the parent chain to find the custom activity that contains this built-in activity // and prepend the ID of the custom activity to the front of the qualified ID of this activity. Debug.Assert(activity.Parent != null, "If this is a built-in activity, its parent should never be null."); string newID = (string.IsNullOrEmpty(id)) ? activity.Name : id; CompositeActivity customActivity = Helpers.GetDeclaringActivity(activity); if (customActivity != null) // sbQId.Append(customActivity.QualifiedName).Append(".").Append(newID); else sbQId.Append(newID); return sbQId.ToString(); } } } // 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
- IBuiltInEvidence.cs
- SequentialWorkflowRootDesigner.cs
- WorkflowWebService.cs
- HijriCalendar.cs
- CompositeScriptReference.cs
- ScriptHandlerFactory.cs
- ProfileParameter.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- DocumentGridPage.cs
- DebugView.cs
- WorkflowClientDeliverMessageWrapper.cs
- Storyboard.cs
- XmlWhitespace.cs
- StateChangeEvent.cs
- HandoffBehavior.cs
- TextSegment.cs
- SaveRecipientRequest.cs
- Relationship.cs
- AgileSafeNativeMemoryHandle.cs
- DSACryptoServiceProvider.cs
- GeometryGroup.cs
- JsonSerializer.cs
- WebAdminConfigurationHelper.cs
- DynamicRendererThreadManager.cs
- WorkflowInstanceAbortedRecord.cs
- StrongNamePublicKeyBlob.cs
- Sequence.cs
- X509Certificate.cs
- EditorBrowsableAttribute.cs
- Inflater.cs
- PerformanceCounterPermissionAttribute.cs
- CheckBoxDesigner.cs
- DiagnosticStrings.cs
- FixedSOMTableCell.cs
- EventArgs.cs
- ReaderWriterLockWrapper.cs
- FileChangesMonitor.cs
- UIElementPropertyUndoUnit.cs
- ClockController.cs
- CompressEmulationStream.cs
- GestureRecognitionResult.cs
- AggregateNode.cs
- ModuleBuilder.cs
- ClickablePoint.cs
- GeneralTransform2DTo3D.cs
- RayHitTestParameters.cs
- ParserStreamGeometryContext.cs
- SelfIssuedAuthProofToken.cs
- BitmapInitialize.cs
- assertwrapper.cs
- RuntimeIdentifierPropertyAttribute.cs
- EntityContainerAssociationSet.cs
- SoapAttributes.cs
- DataGridViewImageCell.cs
- EntityDataSourceWrapper.cs
- ElapsedEventArgs.cs
- Padding.cs
- HandledEventArgs.cs
- AnimationClockResource.cs
- SolidBrush.cs
- DesignerSelectionListAdapter.cs
- RegistryKey.cs
- MergePropertyDescriptor.cs
- DiscoveryServerProtocol.cs
- QuaternionAnimationUsingKeyFrames.cs
- ImageListImageEditor.cs
- PageThemeParser.cs
- SerializationFieldInfo.cs
- DrawingGroup.cs
- DataGridTableCollection.cs
- KnownIds.cs
- HttpApplicationFactory.cs
- DataServiceRequestException.cs
- BooleanSwitch.cs
- FontResourceCache.cs
- StrokeIntersection.cs
- RefreshEventArgs.cs
- DecoderFallback.cs
- Style.cs
- EventLogPermissionEntryCollection.cs
- BaseComponentEditor.cs
- WindowsSecurityToken.cs
- SQLResource.cs
- WebResourceAttribute.cs
- errorpatternmatcher.cs
- MsmqException.cs
- TextTrailingCharacterEllipsis.cs
- WindowsAuthenticationModule.cs
- EnumerableValidator.cs
- _Events.cs
- HttpCacheVaryByContentEncodings.cs
- FormViewModeEventArgs.cs
- OutputCacheEntry.cs
- OleDbInfoMessageEvent.cs
- XmlSchemaCompilationSettings.cs
- XmlQueryType.cs
- Action.cs
- SessionPageStatePersister.cs
- Visual.cs
- MethodBody.cs