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
- ComplexType.cs
- ThousandthOfEmRealPoints.cs
- RowsCopiedEventArgs.cs
- RedistVersionInfo.cs
- TypeName.cs
- HttpModuleCollection.cs
- GetFileNameResult.cs
- Win32NamedPipes.cs
- CapabilitiesAssignment.cs
- CallbackValidator.cs
- MailDefinitionBodyFileNameEditor.cs
- ContextMarshalException.cs
- RuntimeArgumentHandle.cs
- AvTrace.cs
- NodeFunctions.cs
- ClipboardData.cs
- CompositeCollectionView.cs
- WindowsToolbarItemAsMenuItem.cs
- PackagingUtilities.cs
- NativeWindow.cs
- XDRSchema.cs
- AdPostCacheSubstitution.cs
- CaseCqlBlock.cs
- DispatchChannelSink.cs
- XmlParserContext.cs
- SelectionEditor.cs
- MeasureData.cs
- FillErrorEventArgs.cs
- RadioButton.cs
- CapacityStreamGeometryContext.cs
- MsmqIntegrationInputMessage.cs
- CellNormalizer.cs
- EntityParameter.cs
- LinqDataSourceContextEventArgs.cs
- SamlAssertionKeyIdentifierClause.cs
- IntegerValidatorAttribute.cs
- ServiceRoute.cs
- WebBrowserDocumentCompletedEventHandler.cs
- FixedSOMTableRow.cs
- StrongName.cs
- TrustManager.cs
- BoolExpr.cs
- FileUtil.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- mediaclock.cs
- Trace.cs
- CompiledRegexRunner.cs
- Size3D.cs
- LookupNode.cs
- SqlStatistics.cs
- StringAnimationBase.cs
- SystemIPGlobalStatistics.cs
- GridViewRowCollection.cs
- ItemDragEvent.cs
- HtmlUtf8RawTextWriter.cs
- StatusBarPanel.cs
- LocalValueEnumerator.cs
- MexServiceChannelBuilder.cs
- Interlocked.cs
- FullTrustAssembly.cs
- AssemblyAssociatedContentFileAttribute.cs
- ListViewGroupItemCollection.cs
- Soap.cs
- DataServiceQueryException.cs
- DragDropManager.cs
- TraceContextRecord.cs
- ResourceExpressionBuilder.cs
- XmlName.cs
- PeerCollaborationPermission.cs
- Clock.cs
- MulticastDelegate.cs
- OAVariantLib.cs
- ScopedKnownTypes.cs
- ScrollPatternIdentifiers.cs
- XmlHierarchicalEnumerable.cs
- ToolZone.cs
- CreateUserWizard.cs
- CachedBitmap.cs
- XmlJsonWriter.cs
- CodeTypeDelegate.cs
- DataProtection.cs
- HttpVersion.cs
- AliasedSlot.cs
- WarningException.cs
- NameValueSectionHandler.cs
- DelegateTypeInfo.cs
- X509ChainPolicy.cs
- HandlerBase.cs
- ScriptControl.cs
- ObjectItemConventionAssemblyLoader.cs
- StylusOverProperty.cs
- ValidationHelper.cs
- IISUnsafeMethods.cs
- LineServicesRun.cs
- ConstructorNeedsTagAttribute.cs
- BamlLocalizationDictionary.cs
- ColorMatrix.cs
- ConditionCollection.cs
- ToolBarOverflowPanel.cs
- WindowsScrollBar.cs