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
- JoinTreeNode.cs
- CompilerErrorCollection.cs
- TcpTransportSecurity.cs
- SmiGettersStream.cs
- Point.cs
- DataServiceQueryException.cs
- ConnectionManagementSection.cs
- Select.cs
- DataControlLinkButton.cs
- LinearGradientBrush.cs
- ReadOnlyHierarchicalDataSourceView.cs
- GACMembershipCondition.cs
- KnownTypesHelper.cs
- SubMenuStyle.cs
- MarkedHighlightComponent.cs
- TimersDescriptionAttribute.cs
- BinHexEncoder.cs
- DotExpr.cs
- RIPEMD160.cs
- FrameworkPropertyMetadata.cs
- XPathScanner.cs
- EntityViewContainer.cs
- LineGeometry.cs
- XPathChildIterator.cs
- CompositeActivityValidator.cs
- CharStorage.cs
- BuildManagerHost.cs
- HiddenFieldPageStatePersister.cs
- ScaleTransform.cs
- Point4DConverter.cs
- RowToFieldTransformer.cs
- CollectionBase.cs
- DispatcherOperation.cs
- OdbcTransaction.cs
- NavigationProperty.cs
- QueryContinueDragEvent.cs
- ColumnMapCopier.cs
- UniqueEventHelper.cs
- RegexGroup.cs
- WindowsIdentity.cs
- FormatterServices.cs
- MainMenu.cs
- KeyNotFoundException.cs
- TemplateControlCodeDomTreeGenerator.cs
- ADMembershipProvider.cs
- UserValidatedEventArgs.cs
- ComPlusDiagnosticTraceSchemas.cs
- PropertyIdentifier.cs
- AssemblyBuilder.cs
- SqlDataSourceSelectingEventArgs.cs
- RawAppCommandInputReport.cs
- IndexOutOfRangeException.cs
- ReflectionPermission.cs
- TableLayoutCellPaintEventArgs.cs
- SkipStoryboardToFill.cs
- SrgsDocument.cs
- FileClassifier.cs
- ColorKeyFrameCollection.cs
- FamilyTypeface.cs
- XMLSyntaxException.cs
- SecurityNegotiationException.cs
- invalidudtexception.cs
- Attributes.cs
- UInt64Storage.cs
- wgx_sdk_version.cs
- DataService.cs
- MethodImplAttribute.cs
- DataGridViewAccessibleObject.cs
- DbProviderConfigurationHandler.cs
- HtmlPageAdapter.cs
- XsdDateTime.cs
- Container.cs
- MatrixCamera.cs
- ColorAnimationUsingKeyFrames.cs
- ToolStripManager.cs
- SoapElementAttribute.cs
- DataGridViewCellStyle.cs
- PrintDialog.cs
- IssuedTokensHeader.cs
- shaper.cs
- RuntimeWrappedException.cs
- Component.cs
- BoolLiteral.cs
- CatalogZoneDesigner.cs
- RSAOAEPKeyExchangeDeformatter.cs
- XmlSchemaElement.cs
- TitleStyle.cs
- Publisher.cs
- DesignOnlyAttribute.cs
- X509CertificateStore.cs
- DirectionalLight.cs
- DesignerAdRotatorAdapter.cs
- Line.cs
- ErrorBehavior.cs
- TextBoxAutomationPeer.cs
- MarkupCompiler.cs
- CollectionViewGroupRoot.cs
- FlatButtonAppearance.cs
- ButtonBaseDesigner.cs
- XmlILIndex.cs