Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //----------------------------------------------------------------------------- /* */ 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.///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DispatchChannelSink.cs
- ListManagerBindingsCollection.cs
- SqlUdtInfo.cs
- ListViewGroupConverter.cs
- QuaternionAnimation.cs
- altserialization.cs
- MsmqIntegrationInputChannel.cs
- MemberPathMap.cs
- MatrixCamera.cs
- ExceptionRoutedEventArgs.cs
- FaultCode.cs
- AtomContentProperty.cs
- EntitySet.cs
- FontFaceLayoutInfo.cs
- iisPickupDirectory.cs
- HostingEnvironmentException.cs
- OdbcDataReader.cs
- PtsHost.cs
- securitycriticaldataformultiplegetandset.cs
- ApplicationBuildProvider.cs
- UnsafeMethods.cs
- ObjectViewListener.cs
- AggregateNode.cs
- SystemNetworkInterface.cs
- ToolStripContainerDesigner.cs
- COM2TypeInfoProcessor.cs
- WpfSharedXamlSchemaContext.cs
- SiteMap.cs
- Size3DValueSerializer.cs
- InvokePatternIdentifiers.cs
- ToolStripTextBox.cs
- ClientConfigurationSystem.cs
- HttpCachePolicy.cs
- ConfigsHelper.cs
- SqlNodeAnnotation.cs
- ServicePointManagerElement.cs
- StyleBamlRecordReader.cs
- MouseGesture.cs
- TypeName.cs
- IISUnsafeMethods.cs
- VideoDrawing.cs
- AmbiguousMatchException.cs
- ObjectDataSource.cs
- UnsafeNativeMethods.cs
- SingleResultAttribute.cs
- EngineSiteSapi.cs
- RawStylusInputCustomDataList.cs
- EventMetadata.cs
- LookupNode.cs
- TraversalRequest.cs
- QuotedPrintableStream.cs
- SqlTypesSchemaImporter.cs
- SerializationInfo.cs
- InternalUserCancelledException.cs
- ServiceDefaults.cs
- ExtentKey.cs
- RequestQueryProcessor.cs
- DocComment.cs
- COM2PropertyBuilderUITypeEditor.cs
- ExtenderHelpers.cs
- CacheSection.cs
- SerializerWriterEventHandlers.cs
- SystemEvents.cs
- DataGridParentRows.cs
- VariantWrapper.cs
- SafeEventHandle.cs
- CompiledQuery.cs
- TypefaceCollection.cs
- ListSortDescriptionCollection.cs
- TimeSpanValidatorAttribute.cs
- PropertyDescriptor.cs
- SpecialNameAttribute.cs
- WindowsIdentity.cs
- AtlasWeb.Designer.cs
- InstanceCreationEditor.cs
- CodeMemberMethod.cs
- ObjectHandle.cs
- ServiceReference.cs
- HandlerFactoryWrapper.cs
- XmlNodeChangedEventManager.cs
- NumberSubstitution.cs
- DateTimeFormat.cs
- EmbeddedMailObjectsCollection.cs
- CharAnimationUsingKeyFrames.cs
- DynamicDataRoute.cs
- SecurityTokenValidationException.cs
- PipeException.cs
- ValueUtilsSmi.cs
- DesignTimeDataBinding.cs
- ProjectionPruner.cs
- SwitchAttribute.cs
- AuthorizationSection.cs
- FontCacheUtil.cs
- UserValidatedEventArgs.cs
- _NTAuthentication.cs
- ProxyElement.cs
- SpecialNameAttribute.cs
- CurrencyWrapper.cs
- WebUtil.cs
- CollaborationHelperFunctions.cs