Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / SupportsEventValidationAttribute.cs / 1305376 / SupportsEventValidationAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.Collections; using System.ComponentModel; using System.Diagnostics; ////// [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; ////// [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
- Marshal.cs
- ListViewUpdatedEventArgs.cs
- XmlEnumAttribute.cs
- Logging.cs
- AdornerPresentationContext.cs
- Compensate.cs
- PolyBezierSegmentFigureLogic.cs
- COM2ExtendedUITypeEditor.cs
- TypeForwardedToAttribute.cs
- Vector3DAnimationBase.cs
- TransformerConfigurationWizardBase.cs
- MimePart.cs
- SBCSCodePageEncoding.cs
- IDispatchConstantAttribute.cs
- TraceSection.cs
- BuildResult.cs
- RightsManagementEncryptionTransform.cs
- ScriptingWebServicesSectionGroup.cs
- EntityProxyTypeInfo.cs
- XmlNullResolver.cs
- XmlSchemaSet.cs
- LicFileLicenseProvider.cs
- DataGridViewComboBoxCell.cs
- SQLSingleStorage.cs
- ConstructorArgumentAttribute.cs
- HttpRequest.cs
- ContextQuery.cs
- UnsafeNativeMethods.cs
- DataRecordInternal.cs
- FormsAuthentication.cs
- CryptoKeySecurity.cs
- Operator.cs
- precedingquery.cs
- SqlDataSourceAdvancedOptionsForm.cs
- IgnoreFileBuildProvider.cs
- SrgsElementFactory.cs
- PassportAuthenticationEventArgs.cs
- WorkflowHostingEndpoint.cs
- TextElementCollection.cs
- ByteStream.cs
- SpecularMaterial.cs
- DES.cs
- GradientBrush.cs
- UnsafeNativeMethodsMilCoreApi.cs
- BrowserDefinitionCollection.cs
- Number.cs
- DataRowCollection.cs
- ChannelDispatcherBase.cs
- AccessibleObject.cs
- RegexInterpreter.cs
- TriggerBase.cs
- PhysicalFontFamily.cs
- PackageProperties.cs
- DeploymentSection.cs
- SqlConnectionStringBuilder.cs
- XPathAxisIterator.cs
- FixedSOMGroup.cs
- TypeRestriction.cs
- SQLByte.cs
- PaintEvent.cs
- XPathDocumentNavigator.cs
- SetterBase.cs
- TracePayload.cs
- AnonymousIdentificationSection.cs
- RegexParser.cs
- DisableDpiAwarenessAttribute.cs
- MarkerProperties.cs
- GlyphShapingProperties.cs
- StorageComplexTypeMapping.cs
- Point4D.cs
- EventManager.cs
- ContractBase.cs
- TextRangeAdaptor.cs
- ProfilePropertySettings.cs
- FolderBrowserDialog.cs
- DataGridPageChangedEventArgs.cs
- MobileControlBuilder.cs
- SpellerStatusTable.cs
- SyntaxCheck.cs
- EventTrigger.cs
- SignatureResourcePool.cs
- OleDbCommandBuilder.cs
- IChannel.cs
- ControlBindingsCollection.cs
- GPPOINTF.cs
- GregorianCalendarHelper.cs
- Win32PrintDialog.cs
- GenericWebPart.cs
- DataServiceConfiguration.cs
- DataGridCellClipboardEventArgs.cs
- SecUtil.cs
- MarshalByRefObject.cs
- NodeLabelEditEvent.cs
- FontWeight.cs
- LinqTreeNodeEvaluator.cs
- WindowsRebar.cs
- MouseBinding.cs
- CompensateDesigner.cs
- EntityDataSourceChangingEventArgs.cs
- SystemInformation.cs