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
- XslCompiledTransform.cs
- CodeArgumentReferenceExpression.cs
- NavigationService.cs
- SectionVisual.cs
- ProcessInfo.cs
- WindowsFormsHostPropertyMap.cs
- ListViewInsertionMark.cs
- XmlObjectSerializerReadContextComplex.cs
- Link.cs
- PersonalizableAttribute.cs
- MatrixTransform.cs
- CheckoutException.cs
- XmlRootAttribute.cs
- MsdtcWrapper.cs
- ActivityBuilderHelper.cs
- BroadcastEventHelper.cs
- ThicknessAnimation.cs
- CustomAttributeBuilder.cs
- ClrPerspective.cs
- TextComposition.cs
- StringInfo.cs
- DetailsViewUpdateEventArgs.cs
- InputProcessorProfiles.cs
- DefaultParameterValueAttribute.cs
- EnlistmentState.cs
- TextSearch.cs
- ScalarOps.cs
- SubMenuStyleCollection.cs
- SqlUDTStorage.cs
- ManagementClass.cs
- MeshGeometry3D.cs
- XpsFilter.cs
- OrderByLifter.cs
- BinaryMethodMessage.cs
- TextBoxAutomationPeer.cs
- PlatformCulture.cs
- HideDisabledControlAdapter.cs
- SplayTreeNode.cs
- DbParameterCollection.cs
- CancellationHandlerDesigner.cs
- SystemTcpConnection.cs
- NativeMethods.cs
- MsmqInputSessionChannelListener.cs
- DataGridViewAutoSizeModeEventArgs.cs
- CustomErrorCollection.cs
- XmlDictionary.cs
- CodeStatementCollection.cs
- DbMetaDataCollectionNames.cs
- dbdatarecord.cs
- PresentationAppDomainManager.cs
- PropertyGridCommands.cs
- ProjectionPathBuilder.cs
- WhiteSpaceTrimStringConverter.cs
- SingleTagSectionHandler.cs
- UIAgentAsyncEndRequest.cs
- String.cs
- InputProviderSite.cs
- SmtpMail.cs
- Encoding.cs
- CodeSubDirectoriesCollection.cs
- SQLInt32Storage.cs
- SignatureDescription.cs
- ProcessStartInfo.cs
- Transactions.cs
- PtsHost.cs
- ListItemConverter.cs
- CollectionViewSource.cs
- XsdCachingReader.cs
- ImmutablePropertyDescriptorGridEntry.cs
- MatrixStack.cs
- CheckBoxList.cs
- ResetableIterator.cs
- StateRuntime.cs
- WebEventTraceProvider.cs
- BinaryUtilClasses.cs
- WebPartEditVerb.cs
- precedingquery.cs
- ScrollChrome.cs
- Composition.cs
- BuildTopDownAttribute.cs
- SettingsPropertyCollection.cs
- SelectingProviderEventArgs.cs
- HtmlLink.cs
- ActionItem.cs
- RouteParameter.cs
- Literal.cs
- RenderOptions.cs
- PresentationUIStyleResources.cs
- WebPartZone.cs
- FileLogRecordStream.cs
- TextComposition.cs
- BinaryObjectInfo.cs
- CodeSnippetExpression.cs
- HttpValueCollection.cs
- PeerPresenceInfo.cs
- FileCodeGroup.cs
- KeyboardNavigation.cs
- XPathDocumentBuilder.cs
- _OSSOCK.cs
- EntityDataSourceWrapperCollection.cs