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
- DataGridColumnFloatingHeader.cs
- SQLBoolean.cs
- RoleBoolean.cs
- NameObjectCollectionBase.cs
- OdbcConnectionString.cs
- Site.cs
- SystemSounds.cs
- UnsafeNativeMethods.cs
- StorageMappingFragment.cs
- EventLogEntryCollection.cs
- TableParagraph.cs
- RequestContextBase.cs
- PolicyException.cs
- ClassGenerator.cs
- EditingCommands.cs
- SQLChars.cs
- ObservableDictionary.cs
- UrlMappingCollection.cs
- ComponentEditorForm.cs
- TextTreeTextElementNode.cs
- KeyValueConfigurationElement.cs
- SqlNode.cs
- OrCondition.cs
- RestHandler.cs
- InteropBitmapSource.cs
- GACMembershipCondition.cs
- SafeHandles.cs
- WebPartMinimizeVerb.cs
- WriteTimeStream.cs
- VScrollBar.cs
- DataPager.cs
- PropertyChangedEventArgs.cs
- RangeValueProviderWrapper.cs
- ControlsConfig.cs
- ProfileEventArgs.cs
- MonitoringDescriptionAttribute.cs
- CodeDirectionExpression.cs
- LinqExpressionNormalizer.cs
- SqlInternalConnectionSmi.cs
- BrowserDefinition.cs
- DebugHandleTracker.cs
- MSAAEventDispatcher.cs
- Bits.cs
- DataPagerFieldCommandEventArgs.cs
- ChangeConflicts.cs
- AssociationTypeEmitter.cs
- DoubleLink.cs
- ContextStaticAttribute.cs
- EntityTemplateUserControl.cs
- BaseTreeIterator.cs
- ModifiableIteratorCollection.cs
- MapPathBasedVirtualPathProvider.cs
- TraceFilter.cs
- StylusPointCollection.cs
- BinaryObjectReader.cs
- NameValuePair.cs
- DetailsViewInsertEventArgs.cs
- WebPartsSection.cs
- ModelItemExtensions.cs
- PointValueSerializer.cs
- CustomAttributeSerializer.cs
- ReadOnlyCollectionBase.cs
- XdrBuilder.cs
- TransformValueSerializer.cs
- DoubleAnimationClockResource.cs
- OracleBinary.cs
- FixedSOMPage.cs
- DeviceContext.cs
- SqlGatherProducedAliases.cs
- HostDesigntimeLicenseContext.cs
- CompositeDuplexBindingElement.cs
- Base64Encoder.cs
- RawStylusInput.cs
- ResourceExpressionBuilder.cs
- DbUpdateCommandTree.cs
- BrowserCapabilitiesFactoryBase.cs
- Timer.cs
- InstanceOwnerQueryResult.cs
- SoapAttributes.cs
- Composition.cs
- InstallerTypeAttribute.cs
- ParserOptions.cs
- DataGridViewControlCollection.cs
- AgileSafeNativeMemoryHandle.cs
- SafeReadContext.cs
- AssemblyResourceLoader.cs
- CollectionAdapters.cs
- MatrixAnimationUsingPath.cs
- GetWinFXPath.cs
- TimeZoneNotFoundException.cs
- CompiledIdentityConstraint.cs
- SQLBinary.cs
- ClosableStream.cs
- Process.cs
- CommandHelper.cs
- NullableIntAverageAggregationOperator.cs
- XamlRtfConverter.cs
- CodeNamespaceCollection.cs
- RuleConditionDialog.Designer.cs
- WmfPlaceableFileHeader.cs