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
- ListViewInsertionMark.cs
- WsdlEndpointConversionContext.cs
- ImplicitInputBrush.cs
- SecureConversationVersion.cs
- compensatingcollection.cs
- StrokeCollectionDefaultValueFactory.cs
- InputEventArgs.cs
- ConfigsHelper.cs
- ProviderConnectionPointCollection.cs
- TextBox.cs
- ListChangedEventArgs.cs
- WebSysDisplayNameAttribute.cs
- GridViewRowCollection.cs
- ProfilePropertySettings.cs
- CompilationPass2TaskInternal.cs
- Pen.cs
- ForEach.cs
- XslException.cs
- XsltContext.cs
- UnhandledExceptionEventArgs.cs
- Decorator.cs
- WpfWebRequestHelper.cs
- SystemIPGlobalStatistics.cs
- ControlCachePolicy.cs
- MediaEntryAttribute.cs
- MessagePartProtectionMode.cs
- ConnectionPoint.cs
- ReaderContextStackData.cs
- PagePropertiesChangingEventArgs.cs
- Rotation3DAnimationBase.cs
- Helpers.cs
- CroppedBitmap.cs
- DbXmlEnabledProviderManifest.cs
- QueryServiceConfigHandle.cs
- GenericEnumConverter.cs
- SqlFacetAttribute.cs
- LinqDataSourceEditData.cs
- SqlClientMetaDataCollectionNames.cs
- DefaultValueConverter.cs
- ExpandCollapseProviderWrapper.cs
- IItemProperties.cs
- JoinTreeNode.cs
- GraphicsPath.cs
- ReachDocumentReferenceSerializerAsync.cs
- MethodSignatureGenerator.cs
- StringAttributeCollection.cs
- ResolveMatchesApril2005.cs
- AlignmentXValidation.cs
- SqlGenerator.cs
- Popup.cs
- IteratorFilter.cs
- SqlConnection.cs
- RegexInterpreter.cs
- DetailsViewUpdateEventArgs.cs
- DataGridViewLinkCell.cs
- ProxyWebPart.cs
- ImageIndexConverter.cs
- HttpModulesSection.cs
- LinqDataSourceInsertEventArgs.cs
- BinaryParser.cs
- GenerateHelper.cs
- TextEncodedRawTextWriter.cs
- CqlLexer.cs
- HandlerBase.cs
- XPathArrayIterator.cs
- SQLUtility.cs
- RepeatButton.cs
- NewItemsContextMenuStrip.cs
- DataGridViewCellStyleConverter.cs
- SymbolDocumentGenerator.cs
- ListViewEditEventArgs.cs
- DESCryptoServiceProvider.cs
- WmfPlaceableFileHeader.cs
- MinimizableAttributeTypeConverter.cs
- ActivityValidator.cs
- ResourcesBuildProvider.cs
- BidirectionalDictionary.cs
- Storyboard.cs
- WorkflowClientDeliverMessageWrapper.cs
- ReadOnlyDictionary.cs
- HttpHandlerActionCollection.cs
- GridView.cs
- CompressEmulationStream.cs
- PreloadedPackages.cs
- InvalidOleVariantTypeException.cs
- RoleGroupCollection.cs
- SequentialWorkflowHeaderFooter.cs
- SoapIgnoreAttribute.cs
- HostSecurityManager.cs
- UnaryQueryOperator.cs
- Point3D.cs
- PageParser.cs
- LinkLabelLinkClickedEvent.cs
- Tuple.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- TCPListener.cs
- ToolstripProfessionalRenderer.cs
- EpmContentSerializerBase.cs
- KoreanCalendar.cs
- MetadataArtifactLoaderComposite.cs