Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / ViewStateModeByIdAttribute.cs / 1 / 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; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [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; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [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
- SystemEvents.cs
- IndicCharClassifier.cs
- BmpBitmapEncoder.cs
- SqlHelper.cs
- FileInfo.cs
- AsymmetricCryptoHandle.cs
- ScriptBehaviorDescriptor.cs
- RoutedCommand.cs
- WorkflowServiceAttributes.cs
- TableSectionStyle.cs
- Stroke.cs
- WebDisplayNameAttribute.cs
- TreeViewItem.cs
- ConsumerConnectionPoint.cs
- DataServiceProviderMethods.cs
- TimeSpan.cs
- TypeValidationEventArgs.cs
- IPAddressCollection.cs
- StatusCommandUI.cs
- DragDrop.cs
- TypeKeyValue.cs
- RtfFormatStack.cs
- _AutoWebProxyScriptWrapper.cs
- Margins.cs
- UriScheme.cs
- XmlTextReader.cs
- CorruptStoreException.cs
- EdmItemCollection.cs
- WebBrowserNavigatingEventHandler.cs
- X509CertificateChain.cs
- DeploymentSectionCache.cs
- WsdlBuildProvider.cs
- CustomCategoryAttribute.cs
- AuthorizationRuleCollection.cs
- SqlCacheDependency.cs
- BuildProvider.cs
- StorageAssociationTypeMapping.cs
- SolidBrush.cs
- HttpHandlerAction.cs
- ProcessRequestArgs.cs
- WindowsStatusBar.cs
- CommonGetThemePartSize.cs
- HtmlInputCheckBox.cs
- StylusEventArgs.cs
- TableProviderWrapper.cs
- ActivityValidationServices.cs
- SortDescriptionCollection.cs
- DataGridViewToolTip.cs
- ReceiveMessageRecord.cs
- CodeBinaryOperatorExpression.cs
- BooleanFunctions.cs
- LocatorPart.cs
- DataGridViewButtonColumn.cs
- XmlDocumentFragment.cs
- TransformerInfo.cs
- Maps.cs
- Int16.cs
- MSHTMLHostUtil.cs
- DataKey.cs
- CacheRequest.cs
- ModelTypeConverter.cs
- ContextBase.cs
- FilteredXmlReader.cs
- OutputScopeManager.cs
- CodeValidator.cs
- MatchSingleFxEngineOpcode.cs
- Block.cs
- InstanceDescriptor.cs
- InkPresenter.cs
- DragStartedEventArgs.cs
- FtpRequestCacheValidator.cs
- DynamicActionMessageFilter.cs
- MulticastOption.cs
- XmlQueryType.cs
- AspCompat.cs
- InputLanguageSource.cs
- basenumberconverter.cs
- SendKeys.cs
- Vector3DAnimationBase.cs
- WeakRefEnumerator.cs
- ByteStream.cs
- ReadingWritingEntityEventArgs.cs
- MessagePropertyFilter.cs
- InputLangChangeEvent.cs
- UnsafeNativeMethods.cs
- SmiTypedGetterSetter.cs
- TypeLoader.cs
- Overlapped.cs
- EpmTargetTree.cs
- Blend.cs
- Compensation.cs
- HttpModuleAction.cs
- DataGridColumnCollection.cs
- ParserOptions.cs
- ClientApiGenerator.cs
- PageParser.cs
- Switch.cs
- documentation.cs
- DataTableMapping.cs
- ScriptControlDescriptor.cs