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
- WSSecurityPolicy12.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- AddIn.cs
- PriorityItem.cs
- ImmComposition.cs
- SafeRegistryHandle.cs
- Solver.cs
- FixedDocumentPaginator.cs
- PropertyManager.cs
- CustomBindingElementCollection.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- WebPartEditVerb.cs
- StackSpiller.Generated.cs
- JapaneseCalendar.cs
- SQLDouble.cs
- SpStreamWrapper.cs
- SizeAnimationUsingKeyFrames.cs
- ModuleBuilderData.cs
- LinqDataSourceSelectEventArgs.cs
- DeclarativeExpressionConditionDeclaration.cs
- Thumb.cs
- NameValueFileSectionHandler.cs
- XslException.cs
- HandleCollector.cs
- PageOutputColor.cs
- HashMembershipCondition.cs
- ValueTable.cs
- ToolStripPanelRenderEventArgs.cs
- RootDesignerSerializerAttribute.cs
- CodeDomConfigurationHandler.cs
- ClientScriptManagerWrapper.cs
- InvalidCastException.cs
- TableCellCollection.cs
- FileCodeGroup.cs
- BrowserCapabilitiesFactory.cs
- XmlILOptimizerVisitor.cs
- Tuple.cs
- ListArgumentProvider.cs
- ObjectItemLoadingSessionData.cs
- ParameterExpression.cs
- SystemInfo.cs
- KeySpline.cs
- CompositeControl.cs
- Mapping.cs
- SqlCommandBuilder.cs
- IntegerValidatorAttribute.cs
- InputLanguageSource.cs
- TextFormatterHost.cs
- CompiledQuery.cs
- _CookieModule.cs
- ToolStripDropDownClosedEventArgs.cs
- ProtocolViolationException.cs
- FormClosingEvent.cs
- InvokeGenerator.cs
- LinkedResource.cs
- TextUtf8RawTextWriter.cs
- WindowsIdentity.cs
- ToolstripProfessionalRenderer.cs
- DecoderFallback.cs
- XsltContext.cs
- WorkflowServiceBehavior.cs
- DynamicRenderer.cs
- DynamicField.cs
- Matrix3D.cs
- HGlobalSafeHandle.cs
- AuthenticateEventArgs.cs
- ScriptingRoleServiceSection.cs
- XpsDocument.cs
- FactoryId.cs
- CircleEase.cs
- Event.cs
- ObservableDictionary.cs
- FastEncoder.cs
- XmlResolver.cs
- DesignerLoader.cs
- OdbcConnectionStringbuilder.cs
- Privilege.cs
- SectionRecord.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- SplitContainerDesigner.cs
- SystemBrushes.cs
- ImportCatalogPart.cs
- WebPartActionVerb.cs
- NativeMethods.cs
- WindowsFormsLinkLabel.cs
- FloatUtil.cs
- DataTableReaderListener.cs
- RegistryKey.cs
- Compensation.cs
- VarRemapper.cs
- InstancePersistenceEvent.cs
- ReliableChannelFactory.cs
- ISAPIApplicationHost.cs
- Regex.cs
- DbDeleteCommandTree.cs
- SafeNativeMethods.cs
- RemotingAttributes.cs
- ReverseInheritProperty.cs
- VisualStateGroup.cs
- WinFormsSecurity.cs