Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } }///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ValidatorUtils.cs
- CultureInfoConverter.cs
- TabletDeviceInfo.cs
- ListenDesigner.cs
- SqlTransaction.cs
- ResXResourceWriter.cs
- FrameworkContentElement.cs
- ContractNamespaceAttribute.cs
- StyleHelper.cs
- EasingQuaternionKeyFrame.cs
- RuleSetReference.cs
- FileDataSourceCache.cs
- ReflectionPermission.cs
- CaseCqlBlock.cs
- UTF32Encoding.cs
- ACE.cs
- ColorMatrix.cs
- AttributeCollection.cs
- IdentitySection.cs
- SchemaComplexType.cs
- AppPool.cs
- RemoteX509AsymmetricSecurityKey.cs
- ViewManager.cs
- DataGridItem.cs
- ExclusiveCanonicalizationTransform.cs
- FunctionNode.cs
- ErrorStyle.cs
- BuildProviderCollection.cs
- PerformanceCounterCategory.cs
- CollectionDataContractAttribute.cs
- Token.cs
- DrawListViewSubItemEventArgs.cs
- ThrowOnMultipleAssignment.cs
- EncryptedReference.cs
- XmlArrayItemAttributes.cs
- CompilationLock.cs
- DesignerToolboxInfo.cs
- Facet.cs
- DataControlButton.cs
- XmlJsonWriter.cs
- SplineQuaternionKeyFrame.cs
- EventLogEntry.cs
- ColorIndependentAnimationStorage.cs
- DataTrigger.cs
- ElementUtil.cs
- RegexCharClass.cs
- BaseInfoTable.cs
- AttributeTableBuilder.cs
- TextEndOfParagraph.cs
- SoapProtocolReflector.cs
- EditorPart.cs
- WorkflowTransactionService.cs
- DeflateEmulationStream.cs
- FrameworkElement.cs
- ComIntegrationManifestGenerator.cs
- CodeCatchClauseCollection.cs
- WebBrowserNavigatedEventHandler.cs
- BitmapCodecInfo.cs
- UniqueID.cs
- DataGridViewBindingCompleteEventArgs.cs
- InternalPermissions.cs
- ActivityDesigner.cs
- SemaphoreFullException.cs
- GroupStyle.cs
- UITypeEditor.cs
- ComboBoxRenderer.cs
- ProfilePropertySettings.cs
- base64Transforms.cs
- SqlNotificationEventArgs.cs
- Thumb.cs
- OrderedEnumerableRowCollection.cs
- SingleSelectRootGridEntry.cs
- HttpListenerContext.cs
- XMLUtil.cs
- MdiWindowListItemConverter.cs
- ChameleonKey.cs
- ChangeDirector.cs
- TextBox.cs
- PackagePartCollection.cs
- EntityDataSourceSelectedEventArgs.cs
- ResolvedKeyFrameEntry.cs
- DoubleAnimationBase.cs
- ISAPIApplicationHost.cs
- PageCopyCount.cs
- ScriptControlDescriptor.cs
- DragDropManager.cs
- OptionalColumn.cs
- CommandTreeTypeHelper.cs
- ParameterBinding.cs
- ScrollBarAutomationPeer.cs
- NameValuePermission.cs
- Dictionary.cs
- GridViewUpdateEventArgs.cs
- HMACSHA512.cs
- HeaderedContentControl.cs
- SchemaSetCompiler.cs
- DispatcherProcessingDisabled.cs
- BypassElement.cs
- SplitterDesigner.cs
- EnvelopedSignatureTransform.cs