Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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.
//
//-----------------------------------------------------------------------------
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PropertySet.cs
- MsmqTransportSecurityElement.cs
- SplineQuaternionKeyFrame.cs
- AbstractDataSvcMapFileLoader.cs
- UIElementIsland.cs
- BitmapEffectInput.cs
- FamilyTypeface.cs
- LocalTransaction.cs
- HashHelper.cs
- IgnoreSectionHandler.cs
- Walker.cs
- Rectangle.cs
- PauseStoryboard.cs
- HtmlInputHidden.cs
- Compilation.cs
- WebPartMenuStyle.cs
- ToolStripEditorManager.cs
- MulticastDelegate.cs
- EntityStoreSchemaFilterEntry.cs
- Evidence.cs
- FindResponse.cs
- EmbossBitmapEffect.cs
- PersonalizableTypeEntry.cs
- ToolboxComponentsCreatedEventArgs.cs
- DataPagerField.cs
- ProcessDesigner.cs
- Matrix3DStack.cs
- GenericTypeParameterBuilder.cs
- HtmlSelect.cs
- ToolStripDropTargetManager.cs
- DataSourceSerializationException.cs
- FixedTextPointer.cs
- ViewCellRelation.cs
- CustomCredentialPolicy.cs
- SubpageParaClient.cs
- SoapAttributeOverrides.cs
- dbenumerator.cs
- _ChunkParse.cs
- PathFigure.cs
- ConnectionPoint.cs
- PreviewKeyDownEventArgs.cs
- DescendantOverDescendantQuery.cs
- SecurityState.cs
- HTTPNotFoundHandler.cs
- SizeAnimation.cs
- Comparer.cs
- WinEventWrap.cs
- Thickness.cs
- ScrollItemPattern.cs
- ClonableStack.cs
- CodeTypeMember.cs
- LineServices.cs
- EntityDataSource.cs
- CodeAssignStatement.cs
- VisualTreeUtils.cs
- NumberSubstitution.cs
- SqlClientFactory.cs
- ConfigPathUtility.cs
- ObjectHandle.cs
- TypeConverter.cs
- coordinatorfactory.cs
- HttpProtocolReflector.cs
- ButtonAutomationPeer.cs
- DesignerActionService.cs
- SharedHttpsTransportManager.cs
- ToolTip.cs
- Size3DConverter.cs
- XmlTextEncoder.cs
- ObjectListGeneralPage.cs
- WriteFileContext.cs
- NamedObjectList.cs
- MonthCalendar.cs
- LineInfo.cs
- Atom10FormatterFactory.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- ImplicitInputBrush.cs
- XmlSchemaRedefine.cs
- ResetableIterator.cs
- IList.cs
- IsolatedStoragePermission.cs
- XmlDocumentType.cs
- DataGridViewIntLinkedList.cs
- Invariant.cs
- SchemaImporterExtensionElement.cs
- FullTextBreakpoint.cs
- Encoding.cs
- DataServiceResponse.cs
- AccessViolationException.cs
- WebPartConnectionCollection.cs
- LinqDataSourceValidationException.cs
- Exceptions.cs
- CalendarButtonAutomationPeer.cs
- XmlValidatingReader.cs
- ListenerElementsCollection.cs
- CheckBoxRenderer.cs
- AccessorTable.cs
- FixedSOMPageElement.cs
- AttributeCollection.cs
- RelatedPropertyManager.cs
- CommandID.cs