Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / Validation / ValidationContext.cs / 1305376 / ValidationContext.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities.Validation { using System; using System.Collections.Generic; using System.Runtime; [Fx.Tag.XamlVisible(false)] public sealed class ValidationContext { ActivityUtilities.ChildActivity owner; ActivityUtilities.ActivityCallStack parentChain; LocationReferenceEnvironment environment; IListgetChildrenErrors; ProcessActivityTreeOptions options; internal ValidationContext(ActivityUtilities.ChildActivity owner, ActivityUtilities.ActivityCallStack parentChain, ProcessActivityTreeOptions options, LocationReferenceEnvironment environment) { this.owner = owner; this.parentChain = parentChain; this.options = options; this.environment = environment; } internal LocationReferenceEnvironment Environment { get { return this.environment; } } internal IEnumerable GetParents() { List parentsList = new List (); for (int i = 0; i < parentChain.Count; i++) { parentsList.Add(parentChain[i].Activity); } return parentsList; } internal IEnumerable GetWorkflowTree() { // It is okay to just walk the declared parent chain here Activity currentNode = this.owner.Activity; if (currentNode != null) { while (currentNode.Parent != null) { currentNode = currentNode.Parent; } List nodes = ActivityValidationServices.GetChildren(new ActivityUtilities.ChildActivity(currentNode, true), new ActivityUtilities.ActivityCallStack(), this.options); nodes.Add(currentNode); return nodes; } else { return ActivityValidationServices.EmptyChildren; } } internal IEnumerable GetChildren() { if (!this.owner.Equals(ActivityUtilities.ChildActivity.Empty)) { return ActivityValidationServices.GetChildren(this.owner, this.parentChain, this.options); } else { return ActivityValidationServices.EmptyChildren; } } internal void AddGetChildrenErrors(ref IList validationErrors) { if (this.getChildrenErrors != null && this.getChildrenErrors.Count > 0) { if (validationErrors == null) { validationErrors = new List (); } for (int i = 0; i < this.getChildrenErrors.Count; i++) { validationErrors.Add(this.getChildrenErrors[i]); } this.getChildrenErrors = null; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FragmentQuery.cs
- HGlobalSafeHandle.cs
- DbConnectionPoolIdentity.cs
- XmlQueryRuntime.cs
- TimeoutValidationAttribute.cs
- CopyOfAction.cs
- wgx_render.cs
- WebPartConnectionsDisconnectVerb.cs
- XPathDescendantIterator.cs
- InkCanvasAutomationPeer.cs
- IdentityValidationException.cs
- ConcurrencyMode.cs
- Preprocessor.cs
- CustomCategoryAttribute.cs
- HostUtils.cs
- PackageDigitalSignatureManager.cs
- ServerValidateEventArgs.cs
- LogLogRecord.cs
- ComAdminWrapper.cs
- SerializationUtility.cs
- RepeaterItem.cs
- SharedDp.cs
- ACL.cs
- ImageConverter.cs
- RuntimeConfigLKG.cs
- ProjectedSlot.cs
- LinqDataSourceStatusEventArgs.cs
- BaseCollection.cs
- HttpWrapper.cs
- OleDbError.cs
- GenericPrincipal.cs
- WebResourceUtil.cs
- AnnotationHelper.cs
- AttachedAnnotationChangedEventArgs.cs
- UnsafeNativeMethodsCLR.cs
- ExpressionDumper.cs
- FolderBrowserDialog.cs
- VisualTreeHelper.cs
- MetadataUtilsSmi.cs
- StubHelpers.cs
- HandledMouseEvent.cs
- RangeValueProviderWrapper.cs
- WindowsToolbarItemAsMenuItem.cs
- SqlCacheDependencyDatabaseCollection.cs
- GAC.cs
- StylusPoint.cs
- DragEventArgs.cs
- UndoManager.cs
- SymmetricAlgorithm.cs
- TemplateApplicationHelper.cs
- DataGridViewRowCancelEventArgs.cs
- Mutex.cs
- PrimitiveSchema.cs
- ReturnType.cs
- ScriptingProfileServiceSection.cs
- DateTimeConverter2.cs
- WorkflowMarkupSerializationProvider.cs
- ChannelPoolSettingsElement.cs
- DesignerDataSchemaClass.cs
- TreeNodeCollection.cs
- DropAnimation.xaml.cs
- TransformGroup.cs
- AuthorizationRuleCollection.cs
- InstanceContextManager.cs
- ZoneMembershipCondition.cs
- EventDescriptor.cs
- FontFamilyIdentifier.cs
- ConfigurationValidatorAttribute.cs
- MarkupExtensionParser.cs
- File.cs
- HwndKeyboardInputProvider.cs
- PtsPage.cs
- HTMLTagNameToTypeMapper.cs
- PriorityChain.cs
- SimpleNameService.cs
- DataObjectMethodAttribute.cs
- ThumbAutomationPeer.cs
- Stack.cs
- VBIdentifierName.cs
- StartUpEventArgs.cs
- XPathScanner.cs
- DetailsViewCommandEventArgs.cs
- TextServicesCompartmentContext.cs
- LineProperties.cs
- TemplateBuilder.cs
- WebPartHeaderCloseVerb.cs
- ApplicationServicesHostFactory.cs
- SynchronizedInputProviderWrapper.cs
- PageThemeBuildProvider.cs
- Transaction.cs
- ExpressionCopier.cs
- ProviderCollection.cs
- XsdCachingReader.cs
- CacheOutputQuery.cs
- DecimalAnimationBase.cs
- XmlStringTable.cs
- UpdatePanel.cs
- XmlEncodedRawTextWriter.cs
- ClientSettings.cs
- HostingEnvironment.cs