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
- ToolStripRendererSwitcher.cs
- DataGridItemEventArgs.cs
- RecordBuilder.cs
- ValidationHelpers.cs
- UserNameSecurityTokenProvider.cs
- IndicCharClassifier.cs
- Util.cs
- EnumValidator.cs
- DataGridViewRowPostPaintEventArgs.cs
- Line.cs
- WebPartEventArgs.cs
- DetailsViewInsertEventArgs.cs
- TargetInvocationException.cs
- FamilyTypeface.cs
- ColorMatrix.cs
- WebPartZone.cs
- StringStorage.cs
- TextEditorSpelling.cs
- SqlDependencyUtils.cs
- CachedResourceDictionaryExtension.cs
- SQLInt16.cs
- QuaternionIndependentAnimationStorage.cs
- nulltextnavigator.cs
- XmlSerializableWriter.cs
- SynchronizedDispatch.cs
- ContractAdapter.cs
- BufferAllocator.cs
- DataTableMappingCollection.cs
- DrawingState.cs
- CodeCompiler.cs
- ColorMatrix.cs
- AnnotationComponentManager.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ProxyFragment.cs
- CatalogZoneBase.cs
- EncryptedXml.cs
- MediaEntryAttribute.cs
- Win32MouseDevice.cs
- _DigestClient.cs
- Function.cs
- RegexMatchCollection.cs
- UpdatePanelTrigger.cs
- MarshalDirectiveException.cs
- AccessibleObject.cs
- Byte.cs
- DefaultValueAttribute.cs
- PagePropertiesChangingEventArgs.cs
- SplitterPanelDesigner.cs
- ContentDisposition.cs
- DataException.cs
- Encoding.cs
- ZipIOExtraFieldPaddingElement.cs
- HotSpot.cs
- RuntimeArgument.cs
- MenuAutomationPeer.cs
- CodeTypeParameterCollection.cs
- FixedTextBuilder.cs
- TableLayoutStyleCollection.cs
- MobileControl.cs
- ModuleElement.cs
- CodeDefaultValueExpression.cs
- DayRenderEvent.cs
- ComponentFactoryHelpers.cs
- TraceAsyncResult.cs
- ReverseInheritProperty.cs
- TreeView.cs
- Single.cs
- HandleDictionary.cs
- DataControlImageButton.cs
- SRGSCompiler.cs
- Propagator.cs
- AttributeQuery.cs
- DataControlFieldsEditor.cs
- CheckBoxRenderer.cs
- XPathParser.cs
- RequestBringIntoViewEventArgs.cs
- InternalBufferOverflowException.cs
- SystemResourceKey.cs
- PositiveTimeSpanValidator.cs
- MarshalByRefObject.cs
- XmlNodeChangedEventArgs.cs
- XamlNamespaceHelper.cs
- AutoGeneratedFieldProperties.cs
- Attributes.cs
- DataStreams.cs
- TemplateEditingVerb.cs
- IResourceProvider.cs
- ManifestSignedXml.cs
- IdentityManager.cs
- UnsafeNativeMethods.cs
- Misc.cs
- AlignmentYValidation.cs
- DESCryptoServiceProvider.cs
- GroupBox.cs
- LazyTextWriterCreator.cs
- XmlEntityReference.cs
- OAVariantLib.cs
- XpsFilter.cs
- DbProviderFactoriesConfigurationHandler.cs
- DbMetaDataColumnNames.cs