Code:
/ DotNET / DotNET / 8.0 / untmp / Orcas / RTM / ndp / fx / src / xsp / System / Web / Extensions / ui / TargetControlTypeAttribute.cs / 1 / TargetControlTypeAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.Web; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AttributeUsage(AttributeTargets.Class, AllowMultiple = true) ] public sealed class TargetControlTypeAttribute : Attribute { private Type _targetControlType; public TargetControlTypeAttribute(Type targetControlType) { if (targetControlType == null) { throw new ArgumentNullException("targetControlType"); } _targetControlType = targetControlType; } public Type TargetControlType { get { return _targetControlType; } } // For attributes with AllowMultiple set to true, TypeDescriptor.GetAttributes() removes duplicate instances. // These are instances in which TypeId returns equal values. So we must override the TypeId property to // return a unique key. For this attribute, the unique key is just the target control type itself. // (DevDiv Bugs 111475) [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] public override object TypeId { get { return _targetControlType; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Roles.cs
- Selection.cs
- SerialErrors.cs
- NameSpaceExtractor.cs
- WmlListAdapter.cs
- DataTableNameHandler.cs
- ConfigXmlWhitespace.cs
- CollectionViewGroupRoot.cs
- TransformerConfigurationWizardBase.cs
- ToolStripSplitStackLayout.cs
- NameTable.cs
- XmlBinaryReaderSession.cs
- Timer.cs
- RequestCachePolicy.cs
- MarginsConverter.cs
- TransactionScopeDesigner.cs
- SqlCacheDependencyDatabase.cs
- CodeGenHelper.cs
- WeakHashtable.cs
- AdornerDecorator.cs
- ShutDownListener.cs
- ToolStripDropDownButton.cs
- ExceptionUtil.cs
- OutputCacheSettingsSection.cs
- ThicknessAnimationBase.cs
- MultipleViewProviderWrapper.cs
- KeyEventArgs.cs
- QilSortKey.cs
- DataServiceException.cs
- DataGridRowEventArgs.cs
- CharKeyFrameCollection.cs
- COM2ColorConverter.cs
- DateTimePicker.cs
- ImageSourceValueSerializer.cs
- RadialGradientBrush.cs
- WebPartEditorApplyVerb.cs
- Attributes.cs
- PropertyNames.cs
- ReversePositionQuery.cs
- ColorTypeConverter.cs
- WeakReadOnlyCollection.cs
- WindowsListViewScroll.cs
- ReadOnlyDataSourceView.cs
- XmlNodeWriter.cs
- validation.cs
- MissingFieldException.cs
- LineProperties.cs
- CommandPlan.cs
- WebDescriptionAttribute.cs
- NamedPipeHostedTransportConfiguration.cs
- ActivityDefaults.cs
- MSHTMLHostUtil.cs
- GridViewHeaderRowPresenter.cs
- DbMetaDataColumnNames.cs
- RefType.cs
- Int32RectValueSerializer.cs
- TrustSection.cs
- DayRenderEvent.cs
- RestHandler.cs
- SqlDataSourceCommandEventArgs.cs
- DataGridViewCellStateChangedEventArgs.cs
- ProxyDataContractResolver.cs
- TypedRowHandler.cs
- StylusDevice.cs
- CodeDirectiveCollection.cs
- RegexCaptureCollection.cs
- CodeSubDirectoriesCollection.cs
- SqlTransaction.cs
- _AuthenticationState.cs
- SettingsBindableAttribute.cs
- RawUIStateInputReport.cs
- ParameterRetriever.cs
- XmlTextReader.cs
- Sentence.cs
- RegistryKey.cs
- PreProcessor.cs
- FieldAccessException.cs
- Parser.cs
- AspNetPartialTrustHelpers.cs
- PageMediaSize.cs
- XmlException.cs
- SmtpSection.cs
- SystemPens.cs
- DbQueryCommandTree.cs
- DispatcherHooks.cs
- SerTrace.cs
- OwnerDrawPropertyBag.cs
- InputManager.cs
- ScanQueryOperator.cs
- TextServicesCompartmentEventSink.cs
- PatternMatcher.cs
- MemberInfoSerializationHolder.cs
- WebPartCancelEventArgs.cs
- RuleSettings.cs
- Pkcs9Attribute.cs
- TaskExceptionHolder.cs
- TrackBar.cs
- ObjectMaterializedEventArgs.cs
- ACE.cs
- VersionValidator.cs