Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / IDReferencePropertyAttribute.cs / 1305376 / IDReferencePropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; ////// 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)] 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; ////// 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)] 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
- ContentType.cs
- DocumentPaginator.cs
- ErrorFormatter.cs
- IntMinMaxAggregationOperator.cs
- ServiceDeploymentInfo.cs
- TrustLevelCollection.cs
- _NetworkingPerfCounters.cs
- Int64AnimationBase.cs
- ResourcePermissionBase.cs
- CustomAttributeSerializer.cs
- TextAnchor.cs
- SchemaElement.cs
- ListMarkerLine.cs
- RemotingAttributes.cs
- NotifyInputEventArgs.cs
- ValidationErrorCollection.cs
- GroupBoxDesigner.cs
- ReferentialConstraint.cs
- SQLDouble.cs
- KeyPullup.cs
- File.cs
- XmlSchemaSimpleContentRestriction.cs
- FormsAuthenticationConfiguration.cs
- RecordManager.cs
- JpegBitmapEncoder.cs
- MachineKeySection.cs
- AcceptorSessionSymmetricMessageSecurityProtocol.cs
- TCPListener.cs
- XmlAttributeCollection.cs
- HttpConfigurationContext.cs
- TraceRecord.cs
- MemoryFailPoint.cs
- HostTimeoutsElement.cs
- TreeChangeInfo.cs
- ResourceKey.cs
- HandlerFactoryCache.cs
- SetStoryboardSpeedRatio.cs
- SafeViewOfFileHandle.cs
- SwitchElementsCollection.cs
- EditorPart.cs
- RoleServiceManager.cs
- GeometryValueSerializer.cs
- WaitForChangedResult.cs
- IApplicationTrustManager.cs
- OleDbDataReader.cs
- EnumBuilder.cs
- SetterBaseCollection.cs
- XmlLanguageConverter.cs
- BulletedListEventArgs.cs
- RadioButton.cs
- WebPartsSection.cs
- TreeNodeStyleCollection.cs
- CacheVirtualItemsEvent.cs
- RangeContentEnumerator.cs
- DataGridViewDataErrorEventArgs.cs
- StringUtil.cs
- CanonicalizationDriver.cs
- PrintDialogException.cs
- RectAnimationBase.cs
- TypeConvertions.cs
- DataSourceConverter.cs
- LinkTarget.cs
- SamlNameIdentifierClaimResource.cs
- _SafeNetHandles.cs
- HttpModule.cs
- ColumnHeader.cs
- OutputCacheProfileCollection.cs
- MachineKeyConverter.cs
- PeerService.cs
- LockRenewalTask.cs
- ExecutionContext.cs
- RequestUriProcessor.cs
- StateMachineWorkflowInstance.cs
- ToolboxItemSnapLineBehavior.cs
- DefaultSection.cs
- ConnectionStringSettings.cs
- DoWhileDesigner.xaml.cs
- ObjectQueryState.cs
- AdornerPresentationContext.cs
- MarkupProperty.cs
- ExclusiveTcpListener.cs
- XmlSchemaAttributeGroup.cs
- TypeDescriptionProvider.cs
- VectorAnimationBase.cs
- OracleNumber.cs
- TemplateBamlTreeBuilder.cs
- ReferenceTypeElement.cs
- PackageStore.cs
- Crc32.cs
- DragEvent.cs
- SqlRecordBuffer.cs
- DataErrorValidationRule.cs
- SchemaTypeEmitter.cs
- ValidationSummary.cs
- WorkflowRequestContext.cs
- IgnoreFileBuildProvider.cs
- VisualStyleElement.cs
- ConstructorExpr.cs
- PerformanceCounterCategory.cs
- InputMethod.cs