Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / IDReferencePropertyAttribute.cs / 1 / IDReferencePropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Security.Permissions; ////// An IDReferencePropertyAttribute metadata attribute can be applied to string properties /// that contain ID references. /// This can be used to identify ID reference properties which allows design-time functionality /// to do interesting things with the property values. /// [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class IDReferencePropertyAttribute : Attribute { private Type _referencedControlType; ////// public IDReferencePropertyAttribute() : this(typeof(Control)) { } ////// Used to mark a property as an ID reference. In addition, the type of controls /// can be specified. /// public IDReferencePropertyAttribute(Type referencedControlType) { _referencedControlType = referencedControlType; } ////// The types of controls allowed by the property. /// public Type ReferencedControlType { get { return _referencedControlType; } } ///public override int GetHashCode() { return ((ReferencedControlType != null) ? ReferencedControlType.GetHashCode() : 0); } /// public override bool Equals(object obj) { if (obj == this) { return true; } IDReferencePropertyAttribute other = obj as IDReferencePropertyAttribute; if (other != null) { return (ReferencedControlType == other.ReferencedControlType); } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Security.Permissions; ////// An IDReferencePropertyAttribute metadata attribute can be applied to string properties /// that contain ID references. /// This can be used to identify ID reference properties which allows design-time functionality /// to do interesting things with the property values. /// [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class IDReferencePropertyAttribute : Attribute { private Type _referencedControlType; ////// public IDReferencePropertyAttribute() : this(typeof(Control)) { } ////// Used to mark a property as an ID reference. In addition, the type of controls /// can be specified. /// public IDReferencePropertyAttribute(Type referencedControlType) { _referencedControlType = referencedControlType; } ////// The types of controls allowed by the property. /// public Type ReferencedControlType { get { return _referencedControlType; } } ///public override int GetHashCode() { return ((ReferencedControlType != null) ? ReferencedControlType.GetHashCode() : 0); } /// public override bool Equals(object obj) { if (obj == this) { return true; } IDReferencePropertyAttribute other = obj as IDReferencePropertyAttribute; if (other != null) { return (ReferencedControlType == other.ReferencedControlType); } return false; } } } // 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
- SettingsSavedEventArgs.cs
- Stylesheet.cs
- FileStream.cs
- ContextStaticAttribute.cs
- SEHException.cs
- _LocalDataStoreMgr.cs
- TextTreeUndoUnit.cs
- PersianCalendar.cs
- Evidence.cs
- ScriptBehaviorDescriptor.cs
- InputBuffer.cs
- ListBoxAutomationPeer.cs
- precedingquery.cs
- PointCollection.cs
- SqlDataSourceStatusEventArgs.cs
- RoutedEventHandlerInfo.cs
- Control.cs
- FreezableCollection.cs
- CodeIdentifier.cs
- FunctionImportElement.cs
- PixelFormats.cs
- HyperLinkDataBindingHandler.cs
- OrderByBuilder.cs
- VScrollBar.cs
- ResizeBehavior.cs
- CodeExpressionStatement.cs
- LogLogRecordEnumerator.cs
- SrgsItemList.cs
- BooleanKeyFrameCollection.cs
- SocketPermission.cs
- ObsoleteAttribute.cs
- ChtmlLinkAdapter.cs
- Int16Animation.cs
- DrawingContextWalker.cs
- SqlRewriteScalarSubqueries.cs
- PolicyException.cs
- ZipPackage.cs
- ImageMap.cs
- ViewPort3D.cs
- FontResourceCache.cs
- SoundPlayer.cs
- parserscommon.cs
- XsdDateTime.cs
- IndexedGlyphRun.cs
- InvalidCardException.cs
- SystemWebSectionGroup.cs
- Throw.cs
- DictionaryKeyPropertyAttribute.cs
- NonParentingControl.cs
- StringStorage.cs
- ContentType.cs
- AggregationMinMaxHelpers.cs
- XpsFontSubsetter.cs
- FreezableDefaultValueFactory.cs
- DataGridViewImageCell.cs
- ToolConsole.cs
- EdgeProfileValidation.cs
- NullableBoolConverter.cs
- UpdatePanel.cs
- WCFBuildProvider.cs
- PinnedBufferMemoryStream.cs
- FileLevelControlBuilderAttribute.cs
- GorillaCodec.cs
- DataSetUtil.cs
- QueryOperatorEnumerator.cs
- DataRecordObjectView.cs
- ReliableDuplexSessionChannel.cs
- CriticalFileToken.cs
- CheckoutException.cs
- ToolStripDesignerAvailabilityAttribute.cs
- QilTypeChecker.cs
- FixUpCollection.cs
- XmlAttributeAttribute.cs
- PropertyGeneratedEventArgs.cs
- BaseTemplateParser.cs
- SqlClientMetaDataCollectionNames.cs
- DataServiceHostWrapper.cs
- Verify.cs
- DataGridViewCellCancelEventArgs.cs
- Attachment.cs
- JsonClassDataContract.cs
- Socket.cs
- Parameter.cs
- ListDictionaryInternal.cs
- HighlightComponent.cs
- HostedElements.cs
- TableLayoutPanelDesigner.cs
- XmlWriterTraceListener.cs
- AndCondition.cs
- Cell.cs
- ColorAnimation.cs
- TreeNodeCollectionEditor.cs
- ToolStripSeparator.cs
- DataObjectSettingDataEventArgs.cs
- Range.cs
- XmlAutoDetectWriter.cs
- SqlHelper.cs
- TransactionContextManager.cs
- DecoderReplacementFallback.cs
- PageOutputQuality.cs