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
- DelegateBodyWriter.cs
- HttpResponseMessageProperty.cs
- WorkItem.cs
- CodeIndexerExpression.cs
- SqlTriggerContext.cs
- SortExpressionBuilder.cs
- RIPEMD160.cs
- ObjectDisposedException.cs
- ValidatorCollection.cs
- CultureInfo.cs
- MemberDomainMap.cs
- PixelShader.cs
- ReservationCollection.cs
- ProfileService.cs
- MetadataSource.cs
- PaintValueEventArgs.cs
- ProtectedConfigurationSection.cs
- ComboBox.cs
- MessageBox.cs
- MessageBox.cs
- WebPartMinimizeVerb.cs
- ProcessHostMapPath.cs
- EncryptedKey.cs
- TextLineResult.cs
- MultiBinding.cs
- QueryInterceptorAttribute.cs
- DocumentApplication.cs
- SecurityDocument.cs
- DataListCommandEventArgs.cs
- Task.cs
- StylusPlugInCollection.cs
- ColorConverter.cs
- Column.cs
- ExecutionContext.cs
- SchemaImporterExtensionElementCollection.cs
- NgenServicingAttributes.cs
- StringToken.cs
- PromptStyle.cs
- SqlRowUpdatedEvent.cs
- ProtocolsConfigurationHandler.cs
- Menu.cs
- SubpageParagraph.cs
- GraphicsContainer.cs
- DoubleIndependentAnimationStorage.cs
- ResXFileRef.cs
- SettingsPropertyValue.cs
- ReadOnlyTernaryTree.cs
- CompiledAction.cs
- embossbitmapeffect.cs
- SettingsSection.cs
- Graphics.cs
- IERequestCache.cs
- ZipFileInfo.cs
- PublishLicense.cs
- LocationSectionRecord.cs
- ReadOnlyDictionary.cs
- MetafileHeaderEmf.cs
- WsdlInspector.cs
- XmlSiteMapProvider.cs
- WebZone.cs
- AsyncContentLoadedEventArgs.cs
- ObjectConverter.cs
- DeferredTextReference.cs
- SoapSchemaMember.cs
- SafeSecurityHandles.cs
- Hash.cs
- WindowsFont.cs
- ObjectDataSource.cs
- ContentPosition.cs
- ListViewPagedDataSource.cs
- RemoteWebConfigurationHostServer.cs
- DebugView.cs
- OracleLob.cs
- XmlAttributeAttribute.cs
- DataGridViewSelectedColumnCollection.cs
- SQLDoubleStorage.cs
- TargetParameterCountException.cs
- WarningException.cs
- ProfileService.cs
- HMACSHA512.cs
- TextTabProperties.cs
- RecommendedAsConfigurableAttribute.cs
- TdsRecordBufferSetter.cs
- HandledEventArgs.cs
- MatrixKeyFrameCollection.cs
- GradientSpreadMethodValidation.cs
- DiscriminatorMap.cs
- RelationshipEntry.cs
- PagesSection.cs
- ApplicationHost.cs
- EmptyControlCollection.cs
- StateItem.cs
- XsdDataContractImporter.cs
- PropertyConverter.cs
- MailMessage.cs
- WaitHandle.cs
- Label.cs
- IgnoreFlushAndCloseStream.cs
- UnaryNode.cs
- RelationshipEndCollection.cs