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
- SQLDouble.cs
- HttpVersion.cs
- DataStorage.cs
- SafeNativeMethods.cs
- ConfigurationException.cs
- HandlerBase.cs
- HostingEnvironmentSection.cs
- ResourceAttributes.cs
- CompiledAction.cs
- MemoryStream.cs
- _NativeSSPI.cs
- TypeListConverter.cs
- _Semaphore.cs
- TextOnlyOutput.cs
- SBCSCodePageEncoding.cs
- FolderBrowserDialog.cs
- DupHandleConnectionReader.cs
- AlphabetConverter.cs
- IdnElement.cs
- PlainXmlSerializer.cs
- ProxyHelper.cs
- ListView.cs
- ContextItem.cs
- TreeNodeEventArgs.cs
- StringUtil.cs
- DocumentSchemaValidator.cs
- Dispatcher.cs
- TriggerAction.cs
- EqualityComparer.cs
- WorkflowDesignerColors.cs
- UriTemplateTableMatchCandidate.cs
- TypeUtils.cs
- ConnectionStringsSection.cs
- SafeUserTokenHandle.cs
- CachedFontFamily.cs
- BatchStream.cs
- ColumnBinding.cs
- EventHandlerList.cs
- TrackBar.cs
- XmlBoundElement.cs
- WebServiceResponseDesigner.cs
- TextEffectResolver.cs
- RightsManagementResourceHelper.cs
- DataControlButton.cs
- SuppressIldasmAttribute.cs
- AssemblyNameProxy.cs
- SimplePropertyEntry.cs
- ParseChildrenAsPropertiesAttribute.cs
- SerializationAttributes.cs
- LoopExpression.cs
- FileDialogCustomPlace.cs
- OdbcTransaction.cs
- Scanner.cs
- EdmType.cs
- ConnectionsZone.cs
- ConditionalAttribute.cs
- ConfigurationManagerInternal.cs
- PrimaryKeyTypeConverter.cs
- DataBindingCollectionEditor.cs
- Nullable.cs
- _Win32.cs
- AssertSection.cs
- HtmlAnchor.cs
- QueryOperationResponseOfT.cs
- Dictionary.cs
- DocumentPageHost.cs
- DataGridItem.cs
- InheritanceAttribute.cs
- OdbcConnection.cs
- ModuleBuilderData.cs
- HwndMouseInputProvider.cs
- ProtocolsConfigurationHandler.cs
- XmlSerializerFactory.cs
- SpeakCompletedEventArgs.cs
- TextPenaltyModule.cs
- iisPickupDirectory.cs
- ListItemCollection.cs
- Win32.cs
- GregorianCalendarHelper.cs
- CrossAppDomainChannel.cs
- filewebresponse.cs
- ConvertBinder.cs
- ApplicationInfo.cs
- DeflateStream.cs
- LoginUtil.cs
- XmlSortKeyAccumulator.cs
- Error.cs
- TableCell.cs
- StopStoryboard.cs
- RtfNavigator.cs
- IdnMapping.cs
- TypeBuilder.cs
- DataMemberConverter.cs
- selecteditemcollection.cs
- GridView.cs
- RewritingProcessor.cs
- URIFormatException.cs
- AsyncCompletedEventArgs.cs
- OrderByBuilder.cs
- PlatformNotSupportedException.cs