Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- XmlSerializer.cs
- QuaternionValueSerializer.cs
- AsymmetricKeyExchangeFormatter.cs
- ScriptingWebServicesSectionGroup.cs
- ResizeGrip.cs
- ArrayList.cs
- UpdateCompiler.cs
- JsonWriter.cs
- MessageHeaderT.cs
- CollectionBuilder.cs
- ConfigsHelper.cs
- SqlParameterizer.cs
- CompensationHandlingFilter.cs
- EntityDataSourceDesigner.cs
- UnaryNode.cs
- DSACryptoServiceProvider.cs
- CompiledIdentityConstraint.cs
- EmptyStringExpandableObjectConverter.cs
- RecordConverter.cs
- ResourceCodeDomSerializer.cs
- ZoneLinkButton.cs
- DropAnimation.xaml.cs
- ComplexBindingPropertiesAttribute.cs
- DefinitionBase.cs
- SqlCrossApplyToCrossJoin.cs
- GeometryModel3D.cs
- Logging.cs
- SuppressMergeCheckAttribute.cs
- ColorMap.cs
- ProtocolsSection.cs
- Visual3D.cs
- ConfigurationSectionGroup.cs
- XmlQuerySequence.cs
- RelationalExpressions.cs
- FontDialog.cs
- FolderNameEditor.cs
- ConfigXmlCDataSection.cs
- DecimalAnimation.cs
- CqlGenerator.cs
- OutputCacheProfile.cs
- SelectionProviderWrapper.cs
- ValueQuery.cs
- XmlWellformedWriter.cs
- SmtpReplyReaderFactory.cs
- SqlDataSourceSelectingEventArgs.cs
- ContentTextAutomationPeer.cs
- MetadataItem_Static.cs
- WebZone.cs
- ChangePasswordDesigner.cs
- Size3DValueSerializer.cs
- ClientBuildManagerCallback.cs
- RadialGradientBrush.cs
- ObjectIDGenerator.cs
- TextPatternIdentifiers.cs
- ThemeableAttribute.cs
- ColorPalette.cs
- SessionParameter.cs
- CompatibleComparer.cs
- PropertyRecord.cs
- BindingListCollectionView.cs
- QueueSurrogate.cs
- SchemaTypeEmitter.cs
- ScrollBar.cs
- Variant.cs
- InvokeBinder.cs
- EntityCollectionChangedParams.cs
- Expander.cs
- OfTypeExpression.cs
- XmlSchemaSimpleType.cs
- EntryWrittenEventArgs.cs
- MailWebEventProvider.cs
- BitmapCodecInfo.cs
- MetadataCache.cs
- RenderCapability.cs
- Attributes.cs
- GenericTextProperties.cs
- KeyPressEvent.cs
- ClientApiGenerator.cs
- StateRuntime.cs
- TransactionProtocol.cs
- AlternationConverter.cs
- PropertyDescriptor.cs
- WebPartManagerInternals.cs
- FlowDocumentScrollViewer.cs
- NavigationCommands.cs
- DialogResultConverter.cs
- AtomServiceDocumentSerializer.cs
- TransformedBitmap.cs
- X509WindowsSecurityToken.cs
- Point3DCollection.cs
- DoWorkEventArgs.cs
- DockPanel.cs
- InputReportEventArgs.cs
- SmiRequestExecutor.cs
- ObjectHelper.cs
- HttpTransportBindingElement.cs
- StringUtil.cs
- Effect.cs
- SmtpNetworkElement.cs
- DateTimeUtil.cs