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
- FileSecurity.cs
- WrappedDispatcherException.cs
- TextRangeEditTables.cs
- ForeignConstraint.cs
- VScrollProperties.cs
- XmlSchemaGroup.cs
- FormattedText.cs
- SafeEventLogWriteHandle.cs
- DataSourceView.cs
- IriParsingElement.cs
- Query.cs
- securitycriticaldataformultiplegetandset.cs
- UnsafeNativeMethodsMilCoreApi.cs
- PrinterUnitConvert.cs
- ImageKeyConverter.cs
- SynchronizationLockException.cs
- ComPlusInstanceContextInitializer.cs
- OdbcRowUpdatingEvent.cs
- ReadOnlyDictionary.cs
- LocationEnvironment.cs
- DiscoveryMessageSequenceGenerator.cs
- OdbcReferenceCollection.cs
- FunctionGenerator.cs
- GenericEnumConverter.cs
- ToolStripRenderer.cs
- ValueType.cs
- XmlSerializationWriter.cs
- StyleXamlParser.cs
- ExtendedProperty.cs
- exports.cs
- FillErrorEventArgs.cs
- Registry.cs
- GuidelineCollection.cs
- ValueSerializerAttribute.cs
- XmlnsDefinitionAttribute.cs
- PointLight.cs
- TemplatePartAttribute.cs
- StringUtil.cs
- PickBranch.cs
- DataGridCaption.cs
- EditorZoneBase.cs
- WebPartMovingEventArgs.cs
- Vars.cs
- SelectionWordBreaker.cs
- RuntimeHelpers.cs
- EnumConverter.cs
- StylusPointPropertyInfoDefaults.cs
- HyperlinkAutomationPeer.cs
- TypeTypeConverter.cs
- XsdDuration.cs
- UriParserTemplates.cs
- OutOfMemoryException.cs
- GeometryModel3D.cs
- CompareValidator.cs
- DataGridViewRowStateChangedEventArgs.cs
- XmlUtf8RawTextWriter.cs
- Metadata.cs
- SocketElement.cs
- ShaderEffect.cs
- PixelFormat.cs
- ListSortDescription.cs
- Profiler.cs
- ContextMenuAutomationPeer.cs
- LongSumAggregationOperator.cs
- configsystem.cs
- Activator.cs
- AlignmentXValidation.cs
- ClientRoleProvider.cs
- NavigationExpr.cs
- GridEntry.cs
- DataTableClearEvent.cs
- MinimizableAttributeTypeConverter.cs
- TextWriterEngine.cs
- ScrollBarAutomationPeer.cs
- SchemaMapping.cs
- WebPartCatalogCloseVerb.cs
- CollectionsUtil.cs
- OperandQuery.cs
- Debugger.cs
- XPathLexer.cs
- MSG.cs
- ScrollBar.cs
- IItemContainerGenerator.cs
- SelectionChangedEventArgs.cs
- TreeNodeMouseHoverEvent.cs
- SecurityElement.cs
- Stroke.cs
- ServicePerformanceCounters.cs
- HelpProvider.cs
- FileReservationCollection.cs
- DockPatternIdentifiers.cs
- ProviderBase.cs
- MarginCollapsingState.cs
- Image.cs
- CrossContextChannel.cs
- Vector.cs
- ProcessThreadCollection.cs
- EncryptedData.cs
- ValidationErrorInfo.cs
- SymbolPair.cs