Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Activities / Designers / StateDesigner.Helpers.cs / 1305376 / StateDesigner.Helpers.cs
namespace System.Workflow.Activities { using System; using System.Text; using System.Reflection; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing.Design; using System.Drawing; using System.Drawing.Drawing2D; using System.Diagnostics; using System.IO; using System.Windows.Forms; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Design; using System.Runtime.Serialization; internal partial class StateDesigner : FreeformActivityDesigner { #region ContainedDesignersParser class ////// Helper class to sort the contained designers /// private class ContainedDesignersParser { List_stateInitializationDesigners = new List (); List _stateFinalizationDesigners = new List (); List _eventDrivenDesigners = new List (); List _leafStateDesigners = new List (); List _stateDesigners = new List (); List _ordered; internal ContainedDesignersParser(ReadOnlyCollection containedDesigners) { foreach (ActivityDesigner designer in containedDesigners) { StateInitializationDesigner stateInitializationDesigner = designer as StateInitializationDesigner; if (stateInitializationDesigner != null) { _stateInitializationDesigners.Add(stateInitializationDesigner); continue; } StateFinalizationDesigner stateFinalizationDesigner = designer as StateFinalizationDesigner; if (stateFinalizationDesigner != null) { _stateFinalizationDesigners.Add(stateFinalizationDesigner); continue; } EventDrivenDesigner eventDrivenDesigner = designer as EventDrivenDesigner; if (eventDrivenDesigner != null) { _eventDrivenDesigners.Add(eventDrivenDesigner); continue; } StateDesigner stateDesigner = designer as StateDesigner; if (stateDesigner != null) { if (StateMachineHelpers.IsLeafState((StateActivity)designer.Activity)) _leafStateDesigners.Add(stateDesigner); else _stateDesigners.Add(stateDesigner); continue; } } } public List Ordered { get { if (_ordered == null) { _ordered = new List (); _ordered.AddRange(_stateInitializationDesigners.ToArray()); _ordered.AddRange(_eventDrivenDesigners.ToArray()); _ordered.AddRange(_stateFinalizationDesigners.ToArray()); _ordered.AddRange(_leafStateDesigners.ToArray()); _ordered.AddRange(_stateDesigners.ToArray()); } return _ordered; } } public List StateInitializationDesigners { get { return _stateInitializationDesigners; } } public List StateFinalizationDesigners { get { return _stateFinalizationDesigners; } } public List EventDrivenDesigners { get { return _eventDrivenDesigners; } } public List LeafStateDesigners { get { return _leafStateDesigners; } } public List StateDesigners { get { return _stateDesigners; } } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.Activities { using System; using System.Text; using System.Reflection; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.Drawing.Design; using System.Drawing; using System.Drawing.Drawing2D; using System.Diagnostics; using System.IO; using System.Windows.Forms; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Design; using System.Runtime.Serialization; internal partial class StateDesigner : FreeformActivityDesigner { #region ContainedDesignersParser class /// /// Helper class to sort the contained designers /// private class ContainedDesignersParser { List_stateInitializationDesigners = new List (); List _stateFinalizationDesigners = new List (); List _eventDrivenDesigners = new List (); List _leafStateDesigners = new List (); List _stateDesigners = new List (); List _ordered; internal ContainedDesignersParser(ReadOnlyCollection containedDesigners) { foreach (ActivityDesigner designer in containedDesigners) { StateInitializationDesigner stateInitializationDesigner = designer as StateInitializationDesigner; if (stateInitializationDesigner != null) { _stateInitializationDesigners.Add(stateInitializationDesigner); continue; } StateFinalizationDesigner stateFinalizationDesigner = designer as StateFinalizationDesigner; if (stateFinalizationDesigner != null) { _stateFinalizationDesigners.Add(stateFinalizationDesigner); continue; } EventDrivenDesigner eventDrivenDesigner = designer as EventDrivenDesigner; if (eventDrivenDesigner != null) { _eventDrivenDesigners.Add(eventDrivenDesigner); continue; } StateDesigner stateDesigner = designer as StateDesigner; if (stateDesigner != null) { if (StateMachineHelpers.IsLeafState((StateActivity)designer.Activity)) _leafStateDesigners.Add(stateDesigner); else _stateDesigners.Add(stateDesigner); continue; } } } public List Ordered { get { if (_ordered == null) { _ordered = new List (); _ordered.AddRange(_stateInitializationDesigners.ToArray()); _ordered.AddRange(_eventDrivenDesigners.ToArray()); _ordered.AddRange(_stateFinalizationDesigners.ToArray()); _ordered.AddRange(_leafStateDesigners.ToArray()); _ordered.AddRange(_stateDesigners.ToArray()); } return _ordered; } } public List StateInitializationDesigners { get { return _stateInitializationDesigners; } } public List StateFinalizationDesigners { get { return _stateFinalizationDesigners; } } public List EventDrivenDesigners { get { return _eventDrivenDesigners; } } public List LeafStateDesigners { get { return _leafStateDesigners; } } public List StateDesigners { get { return _stateDesigners; } } } #endregion } } // 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
- ProviderSettings.cs
- ResourceSet.cs
- DescriptionAttribute.cs
- LeafCellTreeNode.cs
- EditableTreeList.cs
- GZipDecoder.cs
- Model3D.cs
- SystemIPAddressInformation.cs
- PopupRootAutomationPeer.cs
- Point4DConverter.cs
- PageTheme.cs
- ContextStack.cs
- MediaCommands.cs
- MetadataItemEmitter.cs
- ItemsControlAutomationPeer.cs
- AccessText.cs
- PartialToken.cs
- InkCanvasSelectionAdorner.cs
- TypeDependencyAttribute.cs
- ActivityInstanceReference.cs
- SelectedGridItemChangedEvent.cs
- FusionWrap.cs
- XPathPatternParser.cs
- DataGridViewTextBoxEditingControl.cs
- GlyphCollection.cs
- FlowStep.cs
- CircleEase.cs
- SystemUdpStatistics.cs
- ErrorStyle.cs
- TreeNodeStyleCollection.cs
- FreeFormPanel.cs
- LightweightCodeGenerator.cs
- TemplatedWizardStep.cs
- TypeConverterHelper.cs
- TransformerTypeCollection.cs
- SqlDataSourceFilteringEventArgs.cs
- Int32Converter.cs
- RoleGroupCollection.cs
- ProvidePropertyAttribute.cs
- FunctionQuery.cs
- GetPageNumberCompletedEventArgs.cs
- ComplexTypeEmitter.cs
- counter.cs
- Location.cs
- PathFigure.cs
- CultureInfoConverter.cs
- SecurityTokenContainer.cs
- ActiveXHost.cs
- XmlQuerySequence.cs
- UIPermission.cs
- JsonEncodingStreamWrapper.cs
- XmlDeclaration.cs
- SiteOfOriginContainer.cs
- arabicshape.cs
- Point3D.cs
- CqlLexer.cs
- WindowsProgressbar.cs
- TimelineCollection.cs
- SchemaType.cs
- Duration.cs
- HttpRawResponse.cs
- ScriptingSectionGroup.cs
- ContextMenu.cs
- While.cs
- ConfigUtil.cs
- VariantWrapper.cs
- ResourceProviderFactory.cs
- FloaterParaClient.cs
- XmlSecureResolver.cs
- JsonSerializer.cs
- Cursors.cs
- BigInt.cs
- ObjectStateEntry.cs
- NullableConverter.cs
- KerberosReceiverSecurityToken.cs
- SparseMemoryStream.cs
- ClassicBorderDecorator.cs
- AccessKeyManager.cs
- BindingMAnagerBase.cs
- Types.cs
- Vector3DCollectionConverter.cs
- ProcessThreadCollection.cs
- Literal.cs
- TitleStyle.cs
- PointF.cs
- SqlBulkCopyColumnMapping.cs
- MethodInfo.cs
- Types.cs
- GenericUriParser.cs
- UInt64.cs
- RowUpdatedEventArgs.cs
- MailBnfHelper.cs
- XmlSchemaComplexContentRestriction.cs
- util.cs
- BuildResultCache.cs
- EntitySqlQueryBuilder.cs
- ThreadPool.cs
- DbReferenceCollection.cs
- KeyedHashAlgorithm.cs
- RequestCachePolicyConverter.cs