Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / ViewStateModeByIdAttribute.cs / 1305376 / ViewStateModeByIdAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; [AttributeUsage(AttributeTargets.Class)] public sealed class ViewStateModeByIdAttribute : Attribute { static Hashtable _viewStateIdTypes = Hashtable.Synchronized(new Hashtable()); public ViewStateModeByIdAttribute() { } internal static bool IsEnabled(Type type) { if (!_viewStateIdTypes.ContainsKey(type)) { System.ComponentModel.AttributeCollection attrs = TypeDescriptor.GetAttributes(type); ViewStateModeByIdAttribute attr = (ViewStateModeByIdAttribute)attrs[typeof(ViewStateModeByIdAttribute)]; _viewStateIdTypes[type] = (attr != null); } return (bool)_viewStateIdTypes[type]; } } } // 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.Collections.Generic; using System.ComponentModel; [AttributeUsage(AttributeTargets.Class)] public sealed class ViewStateModeByIdAttribute : Attribute { static Hashtable _viewStateIdTypes = Hashtable.Synchronized(new Hashtable()); public ViewStateModeByIdAttribute() { } internal static bool IsEnabled(Type type) { if (!_viewStateIdTypes.ContainsKey(type)) { System.ComponentModel.AttributeCollection attrs = TypeDescriptor.GetAttributes(type); ViewStateModeByIdAttribute attr = (ViewStateModeByIdAttribute)attrs[typeof(ViewStateModeByIdAttribute)]; _viewStateIdTypes[type] = (attr != null); } return (bool)_viewStateIdTypes[type]; } } } // 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
- FixedTextSelectionProcessor.cs
- SimpleApplicationHost.cs
- DataStreamFromComStream.cs
- _SslState.cs
- TrackingProfileCache.cs
- IxmlLineInfo.cs
- EventProxy.cs
- ProviderConnectionPointCollection.cs
- ClientSettingsProvider.cs
- Light.cs
- ListItemCollection.cs
- SizeConverter.cs
- GridEntryCollection.cs
- ReservationCollection.cs
- DLinqColumnProvider.cs
- FreezableOperations.cs
- Base64Stream.cs
- ServiceRouteHandler.cs
- ObjectNotFoundException.cs
- MimeParameters.cs
- MonikerUtility.cs
- DataServiceHostFactory.cs
- ZoneIdentityPermission.cs
- CommandID.cs
- ApplicationDirectory.cs
- Setter.cs
- IteratorFilter.cs
- EncoderFallback.cs
- RenamedEventArgs.cs
- PropertiesTab.cs
- NavigatorOutput.cs
- SpeechRecognizer.cs
- MemberAccessException.cs
- StringStorage.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- TypeReference.cs
- CategoryNameCollection.cs
- XmlCDATASection.cs
- ScrollViewerAutomationPeer.cs
- EFColumnProvider.cs
- HttpRuntimeSection.cs
- CodePropertyReferenceExpression.cs
- EmptyControlCollection.cs
- shaperfactoryquerycachekey.cs
- TreeViewEvent.cs
- QueryOperationResponseOfT.cs
- PersonalizationAdministration.cs
- OrderByExpression.cs
- DesignerAttribute.cs
- ProtocolsConfigurationHandler.cs
- WebPartDisplayModeCollection.cs
- OverlappedAsyncResult.cs
- WebBrowserBase.cs
- ManagedFilter.cs
- TableLayoutSettings.cs
- CounterSetInstance.cs
- FloatAverageAggregationOperator.cs
- TextBlockAutomationPeer.cs
- BitSet.cs
- EdgeModeValidation.cs
- EventDescriptor.cs
- ObjectSerializerFactory.cs
- VectorCollectionValueSerializer.cs
- RepeaterCommandEventArgs.cs
- ErrorTolerantObjectWriter.cs
- OdbcEnvironment.cs
- XsdCachingReader.cs
- DecoratedNameAttribute.cs
- UrlMappingCollection.cs
- XmlSchemas.cs
- UnsettableComboBox.cs
- cookie.cs
- ProgressBarRenderer.cs
- DataGridRowClipboardEventArgs.cs
- XmlSubtreeReader.cs
- IDQuery.cs
- ListParaClient.cs
- IdentityHolder.cs
- OpenTypeLayoutCache.cs
- DataSourceNameHandler.cs
- ToolStripSplitStackLayout.cs
- IPPacketInformation.cs
- SqlDataSourceFilteringEventArgs.cs
- SoapAttributes.cs
- SafeRightsManagementPubHandle.cs
- entityreference_tresulttype.cs
- Item.cs
- BitmapDownload.cs
- DrawingContextDrawingContextWalker.cs
- HttpCacheParams.cs
- ImageFormat.cs
- IssuedTokenServiceCredential.cs
- DataTablePropertyDescriptor.cs
- ImageListDesigner.cs
- CoreChannel.cs
- CompositeFontParser.cs
- EventLogEntryCollection.cs
- ProjectionPruner.cs
- DesignerActionHeaderItem.cs
- MetadataElement.cs