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
- DynamicActionMessageFilter.cs
- EntityTypeEmitter.cs
- TreeView.cs
- HybridDictionary.cs
- Pair.cs
- LinearKeyFrames.cs
- ButtonAutomationPeer.cs
- lengthconverter.cs
- EntityContainerRelationshipSet.cs
- SqlConnectionFactory.cs
- ping.cs
- XmlUtilWriter.cs
- ToolBar.cs
- DuplicateMessageDetector.cs
- RemoteWebConfigurationHostStream.cs
- _NegoStream.cs
- ValidateNames.cs
- ProfileInfo.cs
- EventBuilder.cs
- PasswordTextContainer.cs
- BCLDebug.cs
- PropertyTab.cs
- OptimizedTemplateContentHelper.cs
- SiteMapNodeCollection.cs
- ObjectDataSourceFilteringEventArgs.cs
- ToolStripDropDown.cs
- ProtectedConfigurationSection.cs
- Mutex.cs
- GraphicsContext.cs
- NumberFunctions.cs
- PageBreakRecord.cs
- CustomWebEventKey.cs
- ComponentResourceManager.cs
- QualificationDataItem.cs
- ColumnMap.cs
- DataMisalignedException.cs
- SafeCryptContextHandle.cs
- TableLayoutStyleCollection.cs
- StrongTypingException.cs
- CuspData.cs
- IntSecurity.cs
- SystemInformation.cs
- TextPenaltyModule.cs
- Subtree.cs
- Int32AnimationBase.cs
- NgenServicingAttributes.cs
- ExtenderHelpers.cs
- CookielessHelper.cs
- SystemInformation.cs
- DataSourceHelper.cs
- CodeIterationStatement.cs
- BooleanAnimationBase.cs
- ActivityWithResult.cs
- Bidi.cs
- HwndHost.cs
- TagNameToTypeMapper.cs
- TableLayoutPanelBehavior.cs
- ADConnectionHelper.cs
- WindowsProgressbar.cs
- RpcCryptoRequest.cs
- RelationshipType.cs
- DesignerDataTable.cs
- ComplusEndpointConfigContainer.cs
- WebEventTraceProvider.cs
- TransformerInfoCollection.cs
- EventEntry.cs
- SoapIgnoreAttribute.cs
- SystemResourceKey.cs
- SerializationStore.cs
- WorkerRequest.cs
- smtpconnection.cs
- QuestionEventArgs.cs
- AsymmetricKeyExchangeDeformatter.cs
- lengthconverter.cs
- DataListItem.cs
- MultitargetingHelpers.cs
- TimeManager.cs
- DynamicRouteExpression.cs
- XmlReaderSettings.cs
- XsltSettings.cs
- GridLengthConverter.cs
- XsltException.cs
- CanonicalFontFamilyReference.cs
- TdsParserStaticMethods.cs
- CardSpaceException.cs
- MsmqBindingElementBase.cs
- HMACMD5.cs
- EntityRecordInfo.cs
- _LocalDataStoreMgr.cs
- BaseAddressPrefixFilterElementCollection.cs
- EventEntry.cs
- IPPacketInformation.cs
- MonthCalendarDesigner.cs
- FactoryId.cs
- MatrixUtil.cs
- IPHostEntry.cs
- FixedSOMSemanticBox.cs
- EncoderReplacementFallback.cs
- ListViewItemSelectionChangedEvent.cs
- InputEventArgs.cs