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
- BulletedListEventArgs.cs
- EventPrivateKey.cs
- TextPointer.cs
- InfoCardX509Validator.cs
- ClientSponsor.cs
- TypeBuilder.cs
- StrokeCollection2.cs
- FlowSwitchLink.cs
- InvalidPrinterException.cs
- Int32KeyFrameCollection.cs
- QilXmlReader.cs
- Util.cs
- AssociatedControlConverter.cs
- SafeHandles.cs
- SecurityRuntime.cs
- DataTransferEventArgs.cs
- ListManagerBindingsCollection.cs
- SrgsRulesCollection.cs
- IconBitmapDecoder.cs
- ListParagraph.cs
- PrivateFontCollection.cs
- OuterGlowBitmapEffect.cs
- ResourceAttributes.cs
- TreeView.cs
- OleDbError.cs
- TypeConverter.cs
- XmlSchemaComplexContent.cs
- ListViewGroup.cs
- MailMessageEventArgs.cs
- WinFormsSecurity.cs
- XmlSchemaInfo.cs
- BinaryParser.cs
- SoapExtensionTypeElement.cs
- HttpRuntimeSection.cs
- FileLoadException.cs
- CryptoStream.cs
- SecurityIdentifierElement.cs
- DataGridViewDataConnection.cs
- XamlToRtfWriter.cs
- BitmapEffectGroup.cs
- EventData.cs
- KeyboardEventArgs.cs
- CookieParameter.cs
- FileDataSourceCache.cs
- FixedTextPointer.cs
- ObjectViewFactory.cs
- JavaScriptString.cs
- DatatypeImplementation.cs
- ContainerParagraph.cs
- SoapAttributeAttribute.cs
- CopyEncoder.cs
- XmlFormatExtensionAttribute.cs
- HandoffBehavior.cs
- DetailsViewDeleteEventArgs.cs
- CodeSnippetTypeMember.cs
- OdbcTransaction.cs
- TypedReference.cs
- StateChangeEvent.cs
- Selector.cs
- ClientTargetSection.cs
- RSAProtectedConfigurationProvider.cs
- PriorityQueue.cs
- SafeBuffer.cs
- ObjectMaterializedEventArgs.cs
- TableRowGroupCollection.cs
- Debug.cs
- OracleBinary.cs
- UshortList2.cs
- FormViewDeletedEventArgs.cs
- TableParaClient.cs
- BaseUriHelper.cs
- TableLayoutPanelCellPosition.cs
- CodeGenerator.cs
- SystemIcons.cs
- CompModSwitches.cs
- LocalizeDesigner.cs
- VisualStateGroup.cs
- RadioButtonPopupAdapter.cs
- FieldCollectionEditor.cs
- DefaultBindingPropertyAttribute.cs
- ExceptionAggregator.cs
- MenuCommand.cs
- FunctionQuery.cs
- WebResourceAttribute.cs
- DataBindEngine.cs
- ProfileSettingsCollection.cs
- SqlAggregateChecker.cs
- ILGenerator.cs
- ToolboxControl.cs
- ColorConvertedBitmap.cs
- FieldNameLookup.cs
- XmlFormatExtensionAttribute.cs
- ControlUtil.cs
- ReferencedAssemblyResolver.cs
- CodeParameterDeclarationExpressionCollection.cs
- TemplateColumn.cs
- InputMethodStateChangeEventArgs.cs
- Number.cs
- SqlMethodAttribute.cs
- BufferBuilder.cs