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
- DocumentGridPage.cs
- ECDiffieHellman.cs
- TextHidden.cs
- SettingsPropertyValueCollection.cs
- Soap12ProtocolImporter.cs
- XmlDictionaryString.cs
- TextRangeBase.cs
- CodeLinePragma.cs
- ChoiceConverter.cs
- HTMLTextWriter.cs
- FunctionNode.cs
- HttpListenerContext.cs
- SetterTriggerConditionValueConverter.cs
- IOException.cs
- KeyboardEventArgs.cs
- XappLauncher.cs
- InvalidateEvent.cs
- StandardRuntimeEnumValidator.cs
- Stacktrace.cs
- QuaternionAnimation.cs
- CurrentChangingEventArgs.cs
- ObjectPropertyMapping.cs
- SafeEventHandle.cs
- SmtpException.cs
- SessionStateUtil.cs
- IisTraceWebEventProvider.cs
- ContextBase.cs
- DataFormats.cs
- ControlDesigner.cs
- CodeRemoveEventStatement.cs
- SetUserLanguageRequest.cs
- Symbol.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- CompleteWizardStep.cs
- EntityDataSource.cs
- OleDbConnectionFactory.cs
- DependencyObjectPropertyDescriptor.cs
- WindowsFormsSectionHandler.cs
- sqlnorm.cs
- _SSPISessionCache.cs
- Int64Converter.cs
- ComPlusThreadInitializer.cs
- printdlgexmarshaler.cs
- Filter.cs
- DrawingContextDrawingContextWalker.cs
- QilGeneratorEnv.cs
- QuotedPrintableStream.cs
- Thumb.cs
- WindowInteropHelper.cs
- XmlHelper.cs
- DriveNotFoundException.cs
- DependencyPropertyValueSerializer.cs
- ScriptResourceAttribute.cs
- DataMisalignedException.cs
- WebPartsPersonalizationAuthorization.cs
- ReliabilityContractAttribute.cs
- XmlIlTypeHelper.cs
- HttpListenerPrefixCollection.cs
- CapabilitiesPattern.cs
- WriteableOnDemandPackagePart.cs
- ManifestResourceInfo.cs
- RuntimeConfig.cs
- Types.cs
- DesignerView.Commands.cs
- CacheDependency.cs
- ClassData.cs
- FieldBuilder.cs
- HostingEnvironmentSection.cs
- BaseParser.cs
- ObjectToken.cs
- URIFormatException.cs
- DecimalConverter.cs
- SearchForVirtualItemEventArgs.cs
- XmlStreamStore.cs
- IPCCacheManager.cs
- FolderLevelBuildProvider.cs
- HttpVersion.cs
- Relationship.cs
- SafeCoTaskMem.cs
- VisualStyleInformation.cs
- NetTcpSecurity.cs
- ShapeTypeface.cs
- BackoffTimeoutHelper.cs
- AdornerLayer.cs
- MetadataArtifactLoader.cs
- LineProperties.cs
- SiteMapDataSource.cs
- StyleXamlTreeBuilder.cs
- TreeViewDataItemAutomationPeer.cs
- Range.cs
- WebControlParameterProxy.cs
- TextWriter.cs
- DataViewManager.cs
- FlowDecision.cs
- CheckBox.cs
- SpellerError.cs
- SchemaCollectionCompiler.cs
- DataTable.cs
- Property.cs
- ConsoleCancelEventArgs.cs