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
- CqlLexer.cs
- ArgumentFixer.cs
- QuadraticBezierSegment.cs
- DbConnectionPoolGroup.cs
- ControlValuePropertyAttribute.cs
- MatrixValueSerializer.cs
- NotifyInputEventArgs.cs
- TypeDependencyAttribute.cs
- _ListenerResponseStream.cs
- Hash.cs
- DataGridBoundColumn.cs
- SupportingTokenSecurityTokenResolver.cs
- Membership.cs
- IncomingWebResponseContext.cs
- EmptyEnumerator.cs
- DependencyPropertyAttribute.cs
- TableSectionStyle.cs
- WrappedIUnknown.cs
- ScriptReferenceBase.cs
- HttpEncoder.cs
- DocumentEventArgs.cs
- HttpHandlerActionCollection.cs
- OleStrCAMarshaler.cs
- DataGridViewCellEventArgs.cs
- ButtonDesigner.cs
- PointLight.cs
- RenderTargetBitmap.cs
- EdmProperty.cs
- _HeaderInfo.cs
- ToolStripPanelCell.cs
- RuntimeUtils.cs
- CodeArrayCreateExpression.cs
- TriggerBase.cs
- ServicePointManagerElement.cs
- DialogResultConverter.cs
- LinearKeyFrames.cs
- XPathNode.cs
- LocalBuilder.cs
- SourceInterpreter.cs
- ControlLocalizer.cs
- ColorKeyFrameCollection.cs
- ObjectAssociationEndMapping.cs
- DateTimeUtil.cs
- SchemaElementLookUpTable.cs
- CultureInfoConverter.cs
- XmlConvert.cs
- safemediahandle.cs
- EdmComplexPropertyAttribute.cs
- XamlRtfConverter.cs
- userdatakeys.cs
- EntityDataSourceContextDisposingEventArgs.cs
- MethodResolver.cs
- PathFigureCollection.cs
- WmlCommandAdapter.cs
- COM2FontConverter.cs
- ApplicationServicesHostFactory.cs
- BasicAsyncResult.cs
- BamlLocalizer.cs
- CheckBoxPopupAdapter.cs
- RenderingEventArgs.cs
- CustomMenuItemCollection.cs
- ScrollEvent.cs
- ReflectionHelper.cs
- StateManagedCollection.cs
- TextTreeDeleteContentUndoUnit.cs
- SmtpNetworkElement.cs
- CompositeDataBoundControl.cs
- AspNetHostingPermission.cs
- BufferedOutputStream.cs
- PropertyTabAttribute.cs
- PtsContext.cs
- WMIInterop.cs
- EditorZoneBase.cs
- WebBrowserUriTypeConverter.cs
- ListItemCollection.cs
- InvalidPrinterException.cs
- StylusDevice.cs
- Int32RectConverter.cs
- ExtractedStateEntry.cs
- ToolStripContainer.cs
- QilBinary.cs
- NativeMethodsOther.cs
- SqlDataSourceRefreshSchemaForm.cs
- MenuItemAutomationPeer.cs
- XmlKeywords.cs
- Set.cs
- ConnectionString.cs
- Matrix3DValueSerializer.cs
- DependencyPropertyConverter.cs
- documentsequencetextcontainer.cs
- SqlCommandSet.cs
- PageSetupDialog.cs
- initElementDictionary.cs
- EntitySetBase.cs
- GridViewCancelEditEventArgs.cs
- TypeToArgumentTypeConverter.cs
- RequestCache.cs
- QueryStoreStatusRequest.cs
- SmiRecordBuffer.cs
- TagNameToTypeMapper.cs