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
- Page.cs
- DictionaryBase.cs
- RIPEMD160Managed.cs
- ParameterSubsegment.cs
- DocumentScope.cs
- ReliableSessionBindingElement.cs
- RenderTargetBitmap.cs
- OdbcCommandBuilder.cs
- TextCompositionManager.cs
- ByteStreamGeometryContext.cs
- FixedSOMPageConstructor.cs
- ChannelDispatcherCollection.cs
- Literal.cs
- DataPager.cs
- FontFamilyIdentifier.cs
- SerTrace.cs
- ListControl.cs
- CorePropertiesFilter.cs
- LeafCellTreeNode.cs
- SmtpNtlmAuthenticationModule.cs
- ITreeGenerator.cs
- SQLInt32.cs
- ContractComponent.cs
- SymbolEqualComparer.cs
- BaseConfigurationRecord.cs
- PointAnimationBase.cs
- DeflateEmulationStream.cs
- SqlDeflator.cs
- LambdaCompiler.Logical.cs
- XmlSchemaRedefine.cs
- EntityCommandCompilationException.cs
- Icon.cs
- TypeForwardedToAttribute.cs
- ScrollPattern.cs
- FileDialog_Vista.cs
- COMException.cs
- ToolStripSeparator.cs
- NullableIntMinMaxAggregationOperator.cs
- ServerType.cs
- RenderData.cs
- ContainerControl.cs
- WindowsSecurityToken.cs
- ModelServiceImpl.cs
- ThreadNeutralSemaphore.cs
- WebZone.cs
- UnionCodeGroup.cs
- CacheMode.cs
- CodeIterationStatement.cs
- LoadedOrUnloadedOperation.cs
- ConnectionPoolManager.cs
- __FastResourceComparer.cs
- Thickness.cs
- ClientSettings.cs
- TimeBoundedCache.cs
- CustomAttributeSerializer.cs
- DomainUpDown.cs
- SqlUtils.cs
- ToolStripLabel.cs
- SeekableReadStream.cs
- LogicalChannel.cs
- HtmlTernaryTree.cs
- ListDesigner.cs
- ProtocolProfile.cs
- HttpPostedFile.cs
- InputLanguageManager.cs
- DataGridViewButtonCell.cs
- SessionStateUtil.cs
- DropShadowBitmapEffect.cs
- DetailsViewPageEventArgs.cs
- PostBackOptions.cs
- CompilationLock.cs
- Win32Exception.cs
- SslStream.cs
- Missing.cs
- QueryableDataSourceEditData.cs
- DesignerHierarchicalDataSourceView.cs
- TrackingDataItem.cs
- ArgumentValueSerializer.cs
- _PooledStream.cs
- SqlAliaser.cs
- BitmapFrameEncode.cs
- CallContext.cs
- TreeNodeSelectionProcessor.cs
- FixedFindEngine.cs
- RadioButtonBaseAdapter.cs
- TypeDescriptionProviderAttribute.cs
- ListViewContainer.cs
- RealizationContext.cs
- RequiredAttributeAttribute.cs
- OdbcCommandBuilder.cs
- BasicExpandProvider.cs
- LinkUtilities.cs
- ExplicitDiscriminatorMap.cs
- CustomCategoryAttribute.cs
- SchemaElementDecl.cs
- SplineKeyFrames.cs
- MorphHelpers.cs
- ToolStripContainerDesigner.cs
- AvtEvent.cs
- PageParserFilter.cs