Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TextEvent.cs
- StreamInfo.cs
- UserInitiatedNavigationPermission.cs
- DNS.cs
- Registry.cs
- DigestComparer.cs
- BitmapSourceSafeMILHandle.cs
- WindowsScroll.cs
- Int16Storage.cs
- SchemaEntity.cs
- ConsumerConnectionPointCollection.cs
- Lasso.cs
- Variant.cs
- DownloadProgressEventArgs.cs
- ToolBarButtonClickEvent.cs
- BookmarkResumptionRecord.cs
- BaseParaClient.cs
- CompileLiteralTextParser.cs
- DataTableExtensions.cs
- COM2ColorConverter.cs
- ConditionChanges.cs
- UriScheme.cs
- recordstate.cs
- SQLConvert.cs
- PropertyEntry.cs
- StringArrayConverter.cs
- input.cs
- MobileListItem.cs
- MaskedTextProvider.cs
- DesignerVerb.cs
- MouseEventArgs.cs
- FormViewDeletedEventArgs.cs
- ToolStripButton.cs
- InputScopeNameConverter.cs
- Selector.cs
- ObjectDataSourceDisposingEventArgs.cs
- DataGridTextBoxColumn.cs
- Memoizer.cs
- ScriptControlDescriptor.cs
- ChannelManagerService.cs
- _SingleItemRequestCache.cs
- PlainXmlSerializer.cs
- DictionaryBase.cs
- XmlnsCompatibleWithAttribute.cs
- DesignerActionItemCollection.cs
- ProfessionalColors.cs
- StatusBar.cs
- HMACSHA256.cs
- SqlDataSourceRefreshSchemaForm.cs
- UnionCodeGroup.cs
- SerializationObjectManager.cs
- SmiMetaDataProperty.cs
- ListBoxItemWrapperAutomationPeer.cs
- WindowsHyperlink.cs
- TemplateBamlTreeBuilder.cs
- SiteMapDataSourceView.cs
- BookmarkEventArgs.cs
- EntityCollectionChangedParams.cs
- Popup.cs
- ColumnWidthChangedEvent.cs
- MoveSizeWinEventHandler.cs
- X509Certificate2.cs
- UserPreferenceChangedEventArgs.cs
- XmlAttributeProperties.cs
- ConfigurationLocationCollection.cs
- StronglyTypedResourceBuilder.cs
- AspProxy.cs
- SmiSettersStream.cs
- DataConnectionHelper.cs
- XsdDateTime.cs
- TagPrefixCollection.cs
- MachineKeyConverter.cs
- RegexCode.cs
- RoutedEventConverter.cs
- TextStore.cs
- AdjustableArrowCap.cs
- EntitySqlQueryCacheKey.cs
- DtdParser.cs
- IODescriptionAttribute.cs
- CompilationSection.cs
- FtpRequestCacheValidator.cs
- SessionEndingCancelEventArgs.cs
- BinaryParser.cs
- InvokeHandlers.cs
- StoryFragments.cs
- DynamicILGenerator.cs
- SHA1Managed.cs
- BitStack.cs
- XmlCharCheckingWriter.cs
- DependencyStoreSurrogate.cs
- Header.cs
- SystemResourceHost.cs
- OleDbRowUpdatingEvent.cs
- XPathNode.cs
- PenThread.cs
- StateRuntime.cs
- WebHostScriptMappingsInstallComponent.cs
- LineServices.cs
- SafeProcessHandle.cs
- nulltextcontainer.cs