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
- DbParameterCollectionHelper.cs
- DataColumnMapping.cs
- srgsitem.cs
- SynchronizedInputPattern.cs
- Table.cs
- ScriptBehaviorDescriptor.cs
- PlanCompiler.cs
- EncoderParameter.cs
- KeyValuePair.cs
- SourceChangedEventArgs.cs
- AssociationTypeEmitter.cs
- IndexOutOfRangeException.cs
- SafeMemoryMappedFileHandle.cs
- Matrix.cs
- DependencyPropertyAttribute.cs
- DbDeleteCommandTree.cs
- DataSourceView.cs
- SqlBooleanizer.cs
- DataGridViewCellParsingEventArgs.cs
- OperationPerformanceCounters.cs
- Context.cs
- FtpCachePolicyElement.cs
- ConnectionManagementElement.cs
- FilterQuery.cs
- FileStream.cs
- BindToObject.cs
- CurrentChangedEventManager.cs
- WmlPanelAdapter.cs
- AuthenticationSection.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- XamlToRtfWriter.cs
- CodeThrowExceptionStatement.cs
- EdmScalarPropertyAttribute.cs
- InputBinding.cs
- GeneralTransform3D.cs
- UpdateException.cs
- Matrix.cs
- UriTemplateTable.cs
- MobileControlsSection.cs
- NameValueCollection.cs
- SoapReflector.cs
- MinMaxParagraphWidth.cs
- Scripts.cs
- CatalogPart.cs
- ClientData.cs
- ProfileSection.cs
- WebPartDescription.cs
- OutputScopeManager.cs
- ISFTagAndGuidCache.cs
- ComplexLine.cs
- Transaction.cs
- _UriTypeConverter.cs
- SystemResources.cs
- PropertyKey.cs
- ResourceContainer.cs
- TablePatternIdentifiers.cs
- Timeline.cs
- FixedStringLookup.cs
- CreateUserWizard.cs
- MDIControlStrip.cs
- WebPartMovingEventArgs.cs
- CheckBoxRenderer.cs
- XmlElementList.cs
- Axis.cs
- CacheDependency.cs
- connectionpool.cs
- WebControlParameterProxy.cs
- AffineTransform3D.cs
- HopperCache.cs
- MethodImplAttribute.cs
- SizeF.cs
- HttpValueCollection.cs
- SurrogateChar.cs
- ObjectDataSourceMethodEventArgs.cs
- DataGridViewCheckBoxCell.cs
- XmlSchemaAttributeGroup.cs
- DesignerAttribute.cs
- CharStorage.cs
- CodePageUtils.cs
- WorkflowEventArgs.cs
- XhtmlTextWriter.cs
- TextModifierScope.cs
- ParamArrayAttribute.cs
- ThousandthOfEmRealPoints.cs
- X509CertificateStore.cs
- SourceElementsCollection.cs
- AspNetCacheProfileAttribute.cs
- FileStream.cs
- ValueSerializer.cs
- ImageMapEventArgs.cs
- Listbox.cs
- BitmapScalingModeValidation.cs
- InnerItemCollectionView.cs
- Size.cs
- CommandTreeTypeHelper.cs
- ConnectionStringSettings.cs
- XmlSchemaSubstitutionGroup.cs
- ProtocolsConfigurationHandler.cs
- MouseGestureConverter.cs
- SQLGuidStorage.cs