Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Compiler / Validation / ValidationManager.cs / 1305376 / ValidationManager.cs
namespace System.Workflow.ComponentModel.Compiler { #region Imports using System; using System.Reflection; using System.Collections; using System.Collections.Generic; using System.ComponentModel.Design.Serialization; #endregion public sealed class ValidationManager : IServiceProvider { #region Data members private Hashtable hashOfValidators = new Hashtable(); private IServiceProvider serviceProvider = null; private ContextStack context = null; private bool validateChildActivities = true; #endregion #region Constructors public ValidationManager(IServiceProvider serviceProvider) : this(serviceProvider, true) { } public ValidationManager(IServiceProvider serviceProvider, bool validateChildActivities) { this.serviceProvider = serviceProvider; this.validateChildActivities = validateChildActivities; } #endregion #region Public members public ContextStack Context { get { if (this.context == null) this.context = new ContextStack(); return this.context; } } public bool ValidateChildActivities { get { return this.validateChildActivities; } } public Validator[] GetValidators(Type type) { if (this.hashOfValidators.Contains(type)) return ((List)this.hashOfValidators[type]).ToArray(); List validators = new List (); foreach (Validator validator in ComponentDispenser.CreateComponents(type, typeof(ActivityValidatorAttribute))) validators.Add(validator); this.hashOfValidators[type] = validators; return validators.ToArray(); } #endregion #region IServiceProvider Members public object GetService(Type serviceType) { return this.serviceProvider.GetService(serviceType); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RowToFieldTransformer.cs
- GestureRecognizer.cs
- SqlDataSourceConfigureFilterForm.cs
- TemplatedMailWebEventProvider.cs
- AttachmentCollection.cs
- RuleSet.cs
- CodeRegionDirective.cs
- ToolStripRenderEventArgs.cs
- MailHeaderInfo.cs
- ContextMenuStrip.cs
- ToolBarOverflowPanel.cs
- GestureRecognitionResult.cs
- XmlILConstructAnalyzer.cs
- SiteMapDataSourceView.cs
- UserControlAutomationPeer.cs
- EventHandlerList.cs
- RuntimeTrackingProfile.cs
- ObjectPersistData.cs
- ReflectPropertyDescriptor.cs
- XmlAttributeProperties.cs
- PropertyDescriptorGridEntry.cs
- IconConverter.cs
- DefaultEvaluationContext.cs
- Message.cs
- MetadataStore.cs
- ApplicationHost.cs
- RegexWriter.cs
- ExtendedProtectionPolicyElement.cs
- CopyCodeAction.cs
- DocumentGrid.cs
- ToolZone.cs
- DataTableReaderListener.cs
- TransformerInfoCollection.cs
- RuntimeHelpers.cs
- PointConverter.cs
- ServiceHttpModule.cs
- CheckBoxField.cs
- XamlGridLengthSerializer.cs
- HtmlInputControl.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- EdmFunction.cs
- TextTreeObjectNode.cs
- AssociationSetMetadata.cs
- FunctionQuery.cs
- SpeakInfo.cs
- ProcessThreadCollection.cs
- XmlAtomErrorReader.cs
- InvalidProgramException.cs
- ParentUndoUnit.cs
- XPathParser.cs
- ZipIOBlockManager.cs
- ApplicationContext.cs
- SqlLiftIndependentRowExpressions.cs
- WebPartManager.cs
- EntityDataReader.cs
- CategoryNameCollection.cs
- HuffModule.cs
- PtsHost.cs
- ByteStorage.cs
- XmlImplementation.cs
- CaseInsensitiveComparer.cs
- SqlNamer.cs
- ImageButton.cs
- ObjectItemCollection.cs
- ScrollBarRenderer.cs
- ObservableDictionary.cs
- ETagAttribute.cs
- SymmetricKeyWrap.cs
- Form.cs
- DataPagerField.cs
- InternalControlCollection.cs
- AnimationException.cs
- FragmentNavigationEventArgs.cs
- DateTimePicker.cs
- AttributeXamlType.cs
- ToolstripProfessionalRenderer.cs
- SynchronousChannelMergeEnumerator.cs
- AutoGeneratedFieldProperties.cs
- ToolBarOverflowPanel.cs
- XmlCountingReader.cs
- Matrix.cs
- CompilerGeneratedAttribute.cs
- IisTraceListener.cs
- Monitor.cs
- GridViewUpdatedEventArgs.cs
- IApplicationTrustManager.cs
- cookiecontainer.cs
- HttpServerVarsCollection.cs
- IsolatedStorageException.cs
- CompilationUtil.cs
- SqlCacheDependencySection.cs
- DesignTimeVisibleAttribute.cs
- PropertyNames.cs
- WebPartManagerInternals.cs
- TextCompositionManager.cs
- ADMembershipUser.cs
- StylusPointCollection.cs
- SubMenuStyle.cs
- PieceDirectory.cs
- ExpressionBuilderCollection.cs