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
- WebPartMenu.cs
- unsafenativemethodstextservices.cs
- Rfc4050KeyFormatter.cs
- MessageQueueAccessControlEntry.cs
- OutOfProcStateClientManager.cs
- Merger.cs
- DirectoryNotFoundException.cs
- ProcessHostMapPath.cs
- DefaultBinder.cs
- AdornedElementPlaceholder.cs
- TextEditor.cs
- WebPartExportVerb.cs
- FormsAuthentication.cs
- ClientApiGenerator.cs
- ServiceModelSecurityTokenRequirement.cs
- ListBoxItemWrapperAutomationPeer.cs
- BinaryReader.cs
- UIElement.cs
- ShaderRenderModeValidation.cs
- FileFormatException.cs
- SourceElementsCollection.cs
- ExpandCollapsePatternIdentifiers.cs
- ProcessHost.cs
- SafeProcessHandle.cs
- SelectionProviderWrapper.cs
- DataGridViewRowHeaderCell.cs
- DataGridViewLinkColumn.cs
- MenuItemBinding.cs
- ClientOptions.cs
- SimpleTextLine.cs
- JumpTask.cs
- SparseMemoryStream.cs
- CachingParameterInspector.cs
- ProfilePropertySettings.cs
- SharedPerformanceCounter.cs
- _NetRes.cs
- SamlSerializer.cs
- WebScriptEnablingElement.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ProcessingInstructionAction.cs
- ThreadInterruptedException.cs
- EncodingNLS.cs
- HttpValueCollection.cs
- Int16AnimationUsingKeyFrames.cs
- TableParagraph.cs
- SelectedCellsChangedEventArgs.cs
- GridView.cs
- OdbcConnectionHandle.cs
- SqlProviderServices.cs
- StyleCollection.cs
- CodeGeneratorAttribute.cs
- DbConnectionStringCommon.cs
- MouseGesture.cs
- SelectionProcessor.cs
- OutputScopeManager.cs
- DetailsView.cs
- ConnectionManagementElement.cs
- StrokeNodeOperations2.cs
- CodeTypeDelegate.cs
- OrthographicCamera.cs
- UserControl.cs
- SHA384Managed.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DesignerForm.cs
- Command.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- RowSpanVector.cs
- PropertyStore.cs
- DateTimeConverter2.cs
- ManagementObjectSearcher.cs
- SmiRecordBuffer.cs
- CloudCollection.cs
- FilteredDataSetHelper.cs
- SafeSecurityHandles.cs
- DependencyObjectPropertyDescriptor.cs
- basevalidator.cs
- MessageQueue.cs
- ProjectedSlot.cs
- TextRangeAdaptor.cs
- ToolStripLocationCancelEventArgs.cs
- ClientCultureInfo.cs
- Message.cs
- DictionaryKeyPropertyAttribute.cs
- RemotingService.cs
- Parser.cs
- _ServiceNameStore.cs
- TiffBitmapEncoder.cs
- WsdlEndpointConversionContext.cs
- ChannelTokenTypeConverter.cs
- X509Certificate2.cs
- XslTransform.cs
- ThreadInterruptedException.cs
- Menu.cs
- ToolStripDesignerAvailabilityAttribute.cs
- PageFunction.cs
- EntitySqlQueryCacheEntry.cs
- RewritingPass.cs
- SqlInfoMessageEvent.cs
- QueryRewriter.cs
- ImageMetadata.cs