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
- CommentGlyph.cs
- XslException.cs
- RoutedEventValueSerializer.cs
- NegatedConstant.cs
- ParameterCollection.cs
- ClientTargetSection.cs
- CustomValidator.cs
- BufferedGraphicsManager.cs
- ManipulationPivot.cs
- SHA384Managed.cs
- ProtocolsConfigurationHandler.cs
- WebPartHeaderCloseVerb.cs
- DbExpressionBuilder.cs
- CqlBlock.cs
- SvcMapFileLoader.cs
- SqlBuilder.cs
- FilterEventArgs.cs
- XmlJsonReader.cs
- OptimalTextSource.cs
- CustomAttributeFormatException.cs
- ConcurrentBag.cs
- SchemaElement.cs
- DirectionalLight.cs
- SqlCommandAsyncResult.cs
- SoapServerMessage.cs
- BinaryObjectWriter.cs
- HwndMouseInputProvider.cs
- UIInitializationException.cs
- ColumnWidthChangedEvent.cs
- RowsCopiedEventArgs.cs
- InputProviderSite.cs
- DefaultClaimSet.cs
- DropShadowBitmapEffect.cs
- SystemTcpStatistics.cs
- LayoutTableCell.cs
- TextEndOfSegment.cs
- TextProperties.cs
- MimeFormatter.cs
- MatrixAnimationUsingPath.cs
- XmlnsPrefixAttribute.cs
- CharStorage.cs
- MutexSecurity.cs
- PageSetupDialog.cs
- MultiByteCodec.cs
- TabRenderer.cs
- PrinterSettings.cs
- StringBuilder.cs
- DecoratedNameAttribute.cs
- precedingquery.cs
- InstanceDataCollectionCollection.cs
- DataObjectPastingEventArgs.cs
- Scalars.cs
- MouseEventArgs.cs
- PreloadHost.cs
- BinaryReader.cs
- MetaTable.cs
- CodeNamespaceImport.cs
- AttachmentCollection.cs
- _ChunkParse.cs
- SHA256Managed.cs
- _NegoState.cs
- EventManager.cs
- ThreadStartException.cs
- TimeoutException.cs
- ExtensionDataObject.cs
- IChannel.cs
- SelectionRangeConverter.cs
- EditorPartChrome.cs
- NominalTypeEliminator.cs
- DataSourceXmlClassAttribute.cs
- ActivationService.cs
- DesigntimeLicenseContext.cs
- WorkflowRuntimeSection.cs
- SynchronizedDispatch.cs
- DrawingCollection.cs
- ScaleTransform.cs
- GenericUI.cs
- EntityDataSourceStatementEditor.cs
- ExpressionNode.cs
- PropertyValidationContext.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- EncodingDataItem.cs
- ExtendedPropertiesHandler.cs
- HashCoreRequest.cs
- WebFormDesignerActionService.cs
- RawStylusInputCustomDataList.cs
- DependencyStoreSurrogate.cs
- DescriptionAttribute.cs
- DbConnectionPoolIdentity.cs
- XmlSchemaValidator.cs
- BaseValidatorDesigner.cs
- AsyncCompletedEventArgs.cs
- HttpResponseBase.cs
- PlatformCulture.cs
- RelationshipDetailsRow.cs
- EventMap.cs
- SiteMapHierarchicalDataSourceView.cs
- BreadCrumbTextConverter.cs
- VerbConverter.cs
- XPathNodePointer.cs