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
- GradientStop.cs
- ExpressionUtilities.cs
- StaticTextPointer.cs
- ToolStripTemplateNode.cs
- PageStatePersister.cs
- HwndStylusInputProvider.cs
- LayoutEngine.cs
- ValidatingPropertiesEventArgs.cs
- PackageDigitalSignature.cs
- WindowPattern.cs
- GetImportFileNameRequest.cs
- RegularExpressionValidator.cs
- Walker.cs
- XmlUrlResolver.cs
- FamilyTypeface.cs
- OleDbParameter.cs
- BrowserCapabilitiesFactoryBase.cs
- CodePageUtils.cs
- returneventsaver.cs
- DataTableNewRowEvent.cs
- ColumnMapTranslator.cs
- InputBuffer.cs
- PrintDialog.cs
- MD5Cng.cs
- CodeIndexerExpression.cs
- NativeRecognizer.cs
- IntSecurity.cs
- FixUp.cs
- XmlSchemaSimpleContentRestriction.cs
- TextEditorParagraphs.cs
- Pen.cs
- ExpandCollapseProviderWrapper.cs
- MetadataWorkspace.cs
- KnownBoxes.cs
- ManifestBasedResourceGroveler.cs
- CompilerErrorCollection.cs
- BufferAllocator.cs
- NativeMethods.cs
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- Unit.cs
- RequestStatusBarUpdateEventArgs.cs
- DesignerSerializationOptionsAttribute.cs
- MetabaseServerConfig.cs
- RequestCachePolicy.cs
- ToolboxItem.cs
- WebBrowserUriTypeConverter.cs
- NavigationHelper.cs
- ConstraintEnumerator.cs
- SoundPlayerAction.cs
- PersonalizableAttribute.cs
- BasePropertyDescriptor.cs
- Misc.cs
- DocumentViewerConstants.cs
- HttpResponseBase.cs
- ToolStripSplitButton.cs
- FileLoadException.cs
- SmiRequestExecutor.cs
- BrushConverter.cs
- embossbitmapeffect.cs
- WindowInteractionStateTracker.cs
- OLEDB_Enum.cs
- LocalValueEnumerator.cs
- RoamingStoreFileUtility.cs
- ReadOnlyDataSourceView.cs
- ActivityExecutionFilter.cs
- AppSecurityManager.cs
- GACMembershipCondition.cs
- CodeGeneratorOptions.cs
- TableParaClient.cs
- SmiGettersStream.cs
- XmlCodeExporter.cs
- IOThreadScheduler.cs
- InternalControlCollection.cs
- ExtensionFile.cs
- NavigationPropertyEmitter.cs
- ContainerUIElement3D.cs
- updateconfighost.cs
- LinqDataSourceDisposeEventArgs.cs
- EditingMode.cs
- HtmlGenericControl.cs
- HTTPNotFoundHandler.cs
- Membership.cs
- NetworkStream.cs
- EventMetadata.cs
- WindowsPen.cs
- WebPartEventArgs.cs
- ProjectionPlanCompiler.cs
- securitycriticaldata.cs
- TreeViewAutomationPeer.cs
- UriTemplateLiteralQueryValue.cs
- BookmarkEventArgs.cs
- FigureParagraph.cs
- BitStream.cs
- PagePropertiesChangingEventArgs.cs
- ReflectionUtil.cs
- QilVisitor.cs
- ReadOnlyDataSource.cs
- FunctionNode.cs
- QueryRewriter.cs
- SecureUICommand.cs