Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RepeaterDataBoundAdapter.cs
- StickyNote.cs
- FormsAuthentication.cs
- AllMembershipCondition.cs
- PropertyHelper.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- Model3DCollection.cs
- StringFormat.cs
- CapabilitiesPattern.cs
- DictionaryBase.cs
- StringComparer.cs
- Triangle.cs
- BindToObject.cs
- OverrideMode.cs
- Int64Converter.cs
- ContentType.cs
- BasicHttpSecurityElement.cs
- BookmarkInfo.cs
- PathFigureCollectionConverter.cs
- ObjectDataSource.cs
- SqlDependency.cs
- DBBindings.cs
- ExpandCollapseProviderWrapper.cs
- UpdateManifestForBrowserApplication.cs
- SqlMetaData.cs
- XmlTypeMapping.cs
- NestedContainer.cs
- RuntimeHandles.cs
- SQLDateTimeStorage.cs
- NativeMethods.cs
- Registration.cs
- ResourcePermissionBase.cs
- InputQueue.cs
- DataPagerField.cs
- DataGridViewCellCancelEventArgs.cs
- RtfControls.cs
- DecimalConstantAttribute.cs
- WebPartZoneBase.cs
- CellParagraph.cs
- PageOutputQuality.cs
- AffineTransform3D.cs
- DynamicResourceExtension.cs
- Environment.cs
- AutomationProperty.cs
- DataGridViewSelectedCellCollection.cs
- HttpModulesInstallComponent.cs
- CssStyleCollection.cs
- CharEntityEncoderFallback.cs
- ObjectDataSourceFilteringEventArgs.cs
- StyleTypedPropertyAttribute.cs
- DataBoundControlDesigner.cs
- CompiledAction.cs
- PropertyGrid.cs
- ParallelRangeManager.cs
- HelpEvent.cs
- CaseInsensitiveComparer.cs
- RegexInterpreter.cs
- WebPartDisplayModeCollection.cs
- XmlDomTextWriter.cs
- CustomTypeDescriptor.cs
- DBCommandBuilder.cs
- PageCatalogPartDesigner.cs
- ResourcePart.cs
- SplitContainer.cs
- DataGridViewCellConverter.cs
- ProcessModelSection.cs
- DbParameterHelper.cs
- PageTheme.cs
- SectionRecord.cs
- LoadWorkflowAsyncResult.cs
- OracleFactory.cs
- BitmapEncoder.cs
- ComponentEditorPage.cs
- AssemblyInfo.cs
- PersonalizableAttribute.cs
- DesignerMetadata.cs
- ApplicationHost.cs
- XmlChildEnumerator.cs
- XamlSerializerUtil.cs
- EventProviderBase.cs
- PackageDigitalSignature.cs
- SchemaTableColumn.cs
- EncoderParameters.cs
- WebHttpDispatchOperationSelector.cs
- GraphicsState.cs
- RootNamespaceAttribute.cs
- BounceEase.cs
- FilteredDataSetHelper.cs
- SubMenuStyle.cs
- PrinterSettings.cs
- ToolStripOverflowButton.cs
- X509Chain.cs
- HttpCookiesSection.cs
- PrimitiveCodeDomSerializer.cs
- TrackBarDesigner.cs
- BooleanProjectedSlot.cs
- ProcessInfo.cs
- DbCommandDefinition.cs
- BaseResourcesBuildProvider.cs
- TreeNodeBinding.cs