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
- ActiveXHost.cs
- GenerateTemporaryTargetAssembly.cs
- KeyTimeConverter.cs
- LinearGradientBrush.cs
- ParseHttpDate.cs
- TableLayoutStyle.cs
- ExtendedPropertyCollection.cs
- MergablePropertyAttribute.cs
- ConfigXmlElement.cs
- WeakRefEnumerator.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- TextUtf8RawTextWriter.cs
- OdbcConnection.cs
- FacetDescription.cs
- UTF7Encoding.cs
- DependencyPropertyKind.cs
- DataGridViewCellLinkedList.cs
- HebrewCalendar.cs
- RichTextBoxConstants.cs
- Delegate.cs
- XmlQualifiedNameTest.cs
- JournalEntry.cs
- XmlDocumentFieldSchema.cs
- CodeTypeReferenceCollection.cs
- CqlQuery.cs
- FunctionImportMapping.cs
- UidPropertyAttribute.cs
- ImmutableCollection.cs
- CodeTypeMemberCollection.cs
- HttpProfileGroupBase.cs
- NativeCompoundFileAPIs.cs
- Application.cs
- Select.cs
- MouseGestureConverter.cs
- Point3DCollectionConverter.cs
- SafeThreadHandle.cs
- InvokePattern.cs
- CodeAttributeArgumentCollection.cs
- PathFigureCollectionValueSerializer.cs
- TextFormatterImp.cs
- GridItem.cs
- CAGDesigner.cs
- GridProviderWrapper.cs
- VBIdentifierDesigner.xaml.cs
- OutputCacheSettings.cs
- CallbackValidatorAttribute.cs
- HelpProvider.cs
- XmlBinaryReader.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- SamlAction.cs
- altserialization.cs
- ClientEventManager.cs
- MenuItemCollectionEditorDialog.cs
- Int64Converter.cs
- XmlExpressionDumper.cs
- MultiSelector.cs
- Themes.cs
- OleDbEnumerator.cs
- CodeTypeDeclarationCollection.cs
- HttpGetServerProtocol.cs
- AssemblyResolver.cs
- X509Utils.cs
- ListViewDataItem.cs
- Command.cs
- ContentOnlyMessage.cs
- PreviewKeyDownEventArgs.cs
- GradientStop.cs
- TemplatedEditableDesignerRegion.cs
- BamlTreeNode.cs
- BitmapEffectCollection.cs
- ScriptServiceAttribute.cs
- PolicyLevel.cs
- IApplicationTrustManager.cs
- DesignerDataConnection.cs
- IndexedSelectQueryOperator.cs
- IsolatedStorageFileStream.cs
- SizeIndependentAnimationStorage.cs
- SafeSystemMetrics.cs
- ConstraintCollection.cs
- ActivityExecutionFilter.cs
- NotCondition.cs
- UpnEndpointIdentityExtension.cs
- EdmItemCollection.cs
- ListenerPerfCounters.cs
- SQLRoleProvider.cs
- TreeNodeStyleCollectionEditor.cs
- ConnectionModeReader.cs
- SingleConverter.cs
- AuthenticatedStream.cs
- FixedTextSelectionProcessor.cs
- HttpWebResponse.cs
- safex509handles.cs
- TrustManager.cs
- IdnMapping.cs
- FilterInvalidBodyAccessException.cs
- EdmType.cs
- ThousandthOfEmRealDoubles.cs
- EventLogPropertySelector.cs
- StateManager.cs
- ProxyGenerator.cs