Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / SupportsEventValidationAttribute.cs / 1305376 / SupportsEventValidationAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.Collections; using System.ComponentModel; using System.Diagnostics; ////// [AttributeUsage(AttributeTargets.Class, AllowMultiple=false)] public sealed class SupportsEventValidationAttribute : Attribute { private static Hashtable _typesSupportsEventValidation; static SupportsEventValidationAttribute() { // Create a synchronized wrapper _typesSupportsEventValidation = Hashtable.Synchronized(new Hashtable()); } public SupportsEventValidationAttribute() { } internal static bool SupportsEventValidation(Type type) { object result = _typesSupportsEventValidation[type]; if (result != null) { return (bool)result; } // Check the attributes on the type to see if it supports SupportsEventValidationAttribute // Note that this attribute does not inherit from the base class, since derived classes may // not be able to validate properly. object[] attribs = type.GetCustomAttributes(typeof(SupportsEventValidationAttribute), false /* inherits */); bool supportsEventValidation = ((attribs != null) && (attribs.Length > 0)); _typesSupportsEventValidation[type] = supportsEventValidation; return supportsEventValidation; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.Collections; using System.ComponentModel; using System.Diagnostics; ////// [AttributeUsage(AttributeTargets.Class, AllowMultiple=false)] public sealed class SupportsEventValidationAttribute : Attribute { private static Hashtable _typesSupportsEventValidation; static SupportsEventValidationAttribute() { // Create a synchronized wrapper _typesSupportsEventValidation = Hashtable.Synchronized(new Hashtable()); } public SupportsEventValidationAttribute() { } internal static bool SupportsEventValidation(Type type) { object result = _typesSupportsEventValidation[type]; if (result != null) { return (bool)result; } // Check the attributes on the type to see if it supports SupportsEventValidationAttribute // Note that this attribute does not inherit from the base class, since derived classes may // not be able to validate properly. object[] attribs = type.GetCustomAttributes(typeof(SupportsEventValidationAttribute), false /* inherits */); bool supportsEventValidation = ((attribs != null) && (attribs.Length > 0)); _typesSupportsEventValidation[type] = supportsEventValidation; return supportsEventValidation; } } } // 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
- ApplicationManager.cs
- ReadOnlyDataSourceView.cs
- unitconverter.cs
- ExtensionDataObject.cs
- EpmSourceTree.cs
- X509SecurityToken.cs
- Timer.cs
- UpDownBase.cs
- ColorPalette.cs
- ValueProviderWrapper.cs
- Console.cs
- Constraint.cs
- AppDomainFactory.cs
- DefaultValidator.cs
- OrderablePartitioner.cs
- TrackingProfile.cs
- StrongNameUtility.cs
- TreeViewImageGenerator.cs
- TransformPattern.cs
- BitmapEffectGroup.cs
- CryptoApi.cs
- XmlNodeChangedEventManager.cs
- CustomExpression.cs
- DataTableReader.cs
- Evaluator.cs
- Point3D.cs
- Simplifier.cs
- COM2ExtendedUITypeEditor.cs
- validation.cs
- EntityProviderFactory.cs
- EtwProvider.cs
- Expander.cs
- ControlPropertyNameConverter.cs
- TextShapeableCharacters.cs
- TextRunCacheImp.cs
- ObjectPersistData.cs
- CodeDOMProvider.cs
- webeventbuffer.cs
- ConstantCheck.cs
- RectAnimationBase.cs
- RC2.cs
- TextOutput.cs
- CodeCompileUnit.cs
- SqlBulkCopyColumnMapping.cs
- DesignerOptionService.cs
- TargetFrameworkAttribute.cs
- HwndAppCommandInputProvider.cs
- NullExtension.cs
- AddInAttribute.cs
- CreatingCookieEventArgs.cs
- TextSearch.cs
- NavigatorInvalidBodyAccessException.cs
- SeekableMessageNavigator.cs
- XmlSortKeyAccumulator.cs
- XmlValueConverter.cs
- Baml6Assembly.cs
- Qualifier.cs
- CompModSwitches.cs
- WebPartConnectionsConfigureVerb.cs
- EntityDataSourceContainerNameItem.cs
- SystemUdpStatistics.cs
- TypeConstant.cs
- ElapsedEventArgs.cs
- AssemblyAssociatedContentFileAttribute.cs
- TableCellAutomationPeer.cs
- WorkflowInstanceTerminatedRecord.cs
- LinqDataSource.cs
- Internal.cs
- NavigationEventArgs.cs
- AVElementHelper.cs
- DropShadowBitmapEffect.cs
- PersonalizationProviderCollection.cs
- WizardSideBarListControlItem.cs
- ConfigPathUtility.cs
- pingexception.cs
- QueryOutputWriterV1.cs
- DataGridComponentEditor.cs
- ContextMenu.cs
- Connection.cs
- SqlConnectionManager.cs
- EdmComplexTypeAttribute.cs
- UrlPath.cs
- XmlSchemaComplexContent.cs
- BitmapEffectState.cs
- ProcessThread.cs
- ReliableRequestSessionChannel.cs
- DeferredReference.cs
- Shared.cs
- _LocalDataStore.cs
- HashCodeCombiner.cs
- newinstructionaction.cs
- DbSetClause.cs
- httpapplicationstate.cs
- ReadOnlyHierarchicalDataSource.cs
- ReflectionPermission.cs
- COM2ICategorizePropertiesHandler.cs
- AutomationPropertyInfo.cs
- StandardCommands.cs
- Authorization.cs
- HostedHttpRequestAsyncResult.cs