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
- DataServiceProviderMethods.cs
- SqlCommand.cs
- ProgramNode.cs
- RepeaterItemCollection.cs
- MetadataProperty.cs
- WorkflowDurableInstance.cs
- TimeStampChecker.cs
- MemberInfoSerializationHolder.cs
- ClearTypeHintValidation.cs
- UnhandledExceptionEventArgs.cs
- TemplateControl.cs
- ColorKeyFrameCollection.cs
- PlatformCulture.cs
- NavigateEvent.cs
- UriWriter.cs
- StringValidator.cs
- PrtCap_Public_Simple.cs
- DeploymentExceptionMapper.cs
- DesignerListAdapter.cs
- DataServiceRequestOfT.cs
- PrinterSettings.cs
- TaskDesigner.cs
- AccessDataSourceWizardForm.cs
- WebPartTransformerCollection.cs
- QuadraticBezierSegment.cs
- CompilationUtil.cs
- ServicesUtilities.cs
- AdornerHitTestResult.cs
- WebPartZoneBase.cs
- validation.cs
- DeflateEmulationStream.cs
- SqlRecordBuffer.cs
- HttpListenerContext.cs
- TaskHelper.cs
- SignatureToken.cs
- Privilege.cs
- EnvironmentPermission.cs
- ContainerAction.cs
- ConfigsHelper.cs
- DataBinding.cs
- NotConverter.cs
- ErrorProvider.cs
- ClientApiGenerator.cs
- SqlDataSourceCommandEventArgs.cs
- PolicyException.cs
- CacheEntry.cs
- CodeArrayCreateExpression.cs
- SoapIgnoreAttribute.cs
- ViewEvent.cs
- ExpressionVisitorHelpers.cs
- ScrollItemProviderWrapper.cs
- ColorAnimationUsingKeyFrames.cs
- HwndMouseInputProvider.cs
- NullableDecimalAverageAggregationOperator.cs
- DataServiceQueryProvider.cs
- WebCategoryAttribute.cs
- DoubleCollection.cs
- TextSimpleMarkerProperties.cs
- KeyValueSerializer.cs
- TableProviderWrapper.cs
- BaseValidator.cs
- LogPolicy.cs
- ListViewItemSelectionChangedEvent.cs
- LinqExpressionNormalizer.cs
- WebPartMenuStyle.cs
- ImageButton.cs
- XmlSchemaObjectTable.cs
- COSERVERINFO.cs
- NotifyIcon.cs
- TerminatorSinks.cs
- HtmlHead.cs
- HttpProcessUtility.cs
- FreezableOperations.cs
- PerformanceCounterPermission.cs
- DNS.cs
- CodeEventReferenceExpression.cs
- ZipIOModeEnforcingStream.cs
- SqlCacheDependencyDatabaseCollection.cs
- PerformanceCounterTraceRecord.cs
- ThemeableAttribute.cs
- FormsAuthentication.cs
- HelpKeywordAttribute.cs
- NavigatorOutput.cs
- FormsAuthenticationEventArgs.cs
- PersonalizationState.cs
- QueryContinueDragEventArgs.cs
- ElementMarkupObject.cs
- BufferModesCollection.cs
- Type.cs
- CommonProperties.cs
- TcpProcessProtocolHandler.cs
- TypedTableBaseExtensions.cs
- AttributeEmitter.cs
- SchemaElement.cs
- DecimalAnimationUsingKeyFrames.cs
- PageHandlerFactory.cs
- MessageSmuggler.cs
- XslCompiledTransform.cs
- SiteOfOriginContainer.cs
- OptimizerPatterns.cs