Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / SupportsEventValidationAttribute.cs / 1 / SupportsEventValidationAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Security.Permissions; ////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [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. //------------------------------------------------------------------------------ ///// // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Security.Permissions; ////// [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [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.///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MetadataItem.cs
- InlineObject.cs
- WebRequestModuleElement.cs
- ReadOnlyCollectionBase.cs
- XmlSchemaObjectCollection.cs
- DrawListViewItemEventArgs.cs
- ToolStripContainer.cs
- ObfuscationAttribute.cs
- FrameworkElementFactoryMarkupObject.cs
- RtfToXamlReader.cs
- NullReferenceException.cs
- RequestResizeEvent.cs
- QilLoop.cs
- SHA256.cs
- RecognitionEventArgs.cs
- SafeNativeMethodsOther.cs
- DataObjectFieldAttribute.cs
- NullExtension.cs
- StringUtil.cs
- WinInetCache.cs
- InvalidFilterCriteriaException.cs
- ContainerControl.cs
- TextRunProperties.cs
- ExitEventArgs.cs
- DownloadProgressEventArgs.cs
- SqlCacheDependencySection.cs
- Timer.cs
- HelpProvider.cs
- PenThread.cs
- MetadataItem.cs
- TrustLevelCollection.cs
- SspiHelper.cs
- OleDbError.cs
- RichTextBoxAutomationPeer.cs
- Stackframe.cs
- SafeEventLogWriteHandle.cs
- StylusDevice.cs
- COM2EnumConverter.cs
- FtpCachePolicyElement.cs
- StateBag.cs
- NullReferenceException.cs
- SelectorItemAutomationPeer.cs
- ObjectViewListener.cs
- IpcClientManager.cs
- SqlCommandSet.cs
- BuildProvider.cs
- RijndaelManaged.cs
- Membership.cs
- BitmapEffectGroup.cs
- BinaryObjectReader.cs
- WebPartChrome.cs
- ValidationPropertyAttribute.cs
- FormViewModeEventArgs.cs
- ResourceDisplayNameAttribute.cs
- ClickablePoint.cs
- ResourceDescriptionAttribute.cs
- ComplexObject.cs
- KeyGestureConverter.cs
- _LocalDataStore.cs
- CodeTypeReferenceExpression.cs
- XmlSerializerVersionAttribute.cs
- X509SecurityTokenAuthenticator.cs
- RuleSettingsCollection.cs
- ToolboxControl.cs
- VisualBasicImportReference.cs
- CommunicationException.cs
- SubstitutionList.cs
- AutoCompleteStringCollection.cs
- Errors.cs
- Brush.cs
- Geometry3D.cs
- OpenTypeLayoutCache.cs
- Attributes.cs
- NullExtension.cs
- DrawingGroupDrawingContext.cs
- EditorPartCollection.cs
- Variable.cs
- DrawItemEvent.cs
- VectorCollectionConverter.cs
- DiscoveryClientElement.cs
- PermissionSetTriple.cs
- OleDbReferenceCollection.cs
- GraphicsPathIterator.cs
- StrokeCollection2.cs
- StrokeFIndices.cs
- SkewTransform.cs
- MeasureData.cs
- SchemaMerger.cs
- AlignmentYValidation.cs
- EntityDataSourceContextCreatedEventArgs.cs
- InkCanvas.cs
- LayoutEvent.cs
- embossbitmapeffect.cs
- CqlErrorHelper.cs
- DirectoryRootQuery.cs
- ArgumentNullException.cs
- SubstitutionResponseElement.cs
- SByte.cs
- HttpCapabilitiesEvaluator.cs
- PublisherIdentityPermission.cs