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
- DetailsViewRow.cs
- PathSegmentCollection.cs
- PageCatalogPartDesigner.cs
- webclient.cs
- DataGridViewCellCollection.cs
- ResourceWriter.cs
- HtmlTableCellCollection.cs
- SymLanguageType.cs
- TypedReference.cs
- DynamicResourceExtension.cs
- InfoCardXmlSerializer.cs
- SqlDataReaderSmi.cs
- ExpandSegment.cs
- DynamicDataResources.Designer.cs
- ChannelManager.cs
- RsaSecurityTokenParameters.cs
- DesignerAttribute.cs
- OdbcInfoMessageEvent.cs
- CodeCommentStatement.cs
- GeneralEndpointIdentity.cs
- StateDesigner.CommentLayoutGlyph.cs
- KnownTypeAttribute.cs
- ToolStripDropDownButton.cs
- AnnotationComponentManager.cs
- ChannelSinkStacks.cs
- PreviewPageInfo.cs
- WebPartDisplayModeCancelEventArgs.cs
- ProvidersHelper.cs
- ConfigXmlComment.cs
- PropertyTabChangedEvent.cs
- DesignerOptionService.cs
- TextServicesPropertyRanges.cs
- DataControlButton.cs
- ArrangedElementCollection.cs
- DataKeyArray.cs
- XmlSchemaGroupRef.cs
- StringUtil.cs
- DynamicUpdateCommand.cs
- SortableBindingList.cs
- QueryResult.cs
- PrivilegedConfigurationManager.cs
- BitArray.cs
- ComponentEvent.cs
- HtmlInputReset.cs
- RequestCacheEntry.cs
- DurableInstanceProvider.cs
- Form.cs
- SortedDictionary.cs
- GeneralTransform2DTo3DTo2D.cs
- PermissionSet.cs
- EventLogPermissionEntry.cs
- IntSecurity.cs
- Emitter.cs
- StringSorter.cs
- EditorPart.cs
- BufferedReadStream.cs
- ThemeableAttribute.cs
- EntityAdapter.cs
- ArgIterator.cs
- RtfToken.cs
- PropertySegmentSerializationProvider.cs
- PerformanceCounter.cs
- QilReplaceVisitor.cs
- FlowLayoutSettings.cs
- Message.cs
- TypeHelper.cs
- DataGridViewToolTip.cs
- UInt32Storage.cs
- TypographyProperties.cs
- SigningCredentials.cs
- UidManager.cs
- XsltContext.cs
- Brush.cs
- ModelVisual3D.cs
- ExceptionValidationRule.cs
- WebPartMinimizeVerb.cs
- storagemappingitemcollection.viewdictionary.cs
- DebugView.cs
- TableLayoutPanel.cs
- XmlSchemaSimpleTypeRestriction.cs
- cryptoapiTransform.cs
- ErrorHandler.cs
- LogicalExpr.cs
- EarlyBoundInfo.cs
- EdmItemError.cs
- CursorConverter.cs
- WebPartTransformerAttribute.cs
- ConfigXmlCDataSection.cs
- ToolBarButtonClickEvent.cs
- ListViewGroup.cs
- IntSecurity.cs
- CmsInterop.cs
- UInt16Converter.cs
- IdentifierService.cs
- ActivityBindForm.Designer.cs
- SafeFileMappingHandle.cs
- datacache.cs
- XmlSchemaCompilationSettings.cs
- BitStack.cs
- SecuritySessionSecurityTokenProvider.cs