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
- XmlLoader.cs
- DataControlFieldCollection.cs
- PreviewPageInfo.cs
- MembershipSection.cs
- TemplateModeChangedEventArgs.cs
- FlowNode.cs
- WebHttpDispatchOperationSelector.cs
- SmtpReplyReaderFactory.cs
- AppLevelCompilationSectionCache.cs
- StateRuntime.cs
- ToolStripDropDownItem.cs
- RubberbandSelector.cs
- DataObjectFieldAttribute.cs
- coordinatorscratchpad.cs
- ProfileGroupSettingsCollection.cs
- GridViewRowPresenterBase.cs
- ProvidersHelper.cs
- SafeArchiveContext.cs
- NoPersistHandle.cs
- ContentPosition.cs
- FigureParagraph.cs
- XslAstAnalyzer.cs
- SessionEndingCancelEventArgs.cs
- TemplatePagerField.cs
- XmlAnyAttributeAttribute.cs
- GZipStream.cs
- BuilderInfo.cs
- ConfigUtil.cs
- Int32AnimationBase.cs
- SafeJobHandle.cs
- CurrencyWrapper.cs
- RegexBoyerMoore.cs
- DbReferenceCollection.cs
- ListViewGroup.cs
- MergePropertyDescriptor.cs
- SoapObjectInfo.cs
- GroupedContextMenuStrip.cs
- DispatcherExceptionFilterEventArgs.cs
- MaterializeFromAtom.cs
- XmlRawWriterWrapper.cs
- DataGridPreparingCellForEditEventArgs.cs
- ResourceExpression.cs
- MimeBasePart.cs
- PtsHost.cs
- JulianCalendar.cs
- UserControlCodeDomTreeGenerator.cs
- XmlIncludeAttribute.cs
- ReferencedCollectionType.cs
- WebRequest.cs
- XPathNavigator.cs
- BinaryObjectWriter.cs
- InvokeMethodActivityDesigner.cs
- ResourceProviderFactory.cs
- _NetRes.cs
- FrameworkContentElement.cs
- WindowsPrincipal.cs
- SearchForVirtualItemEventArgs.cs
- MappingItemCollection.cs
- SizeKeyFrameCollection.cs
- _LazyAsyncResult.cs
- Delegate.cs
- Directory.cs
- PeerNameResolver.cs
- DmlSqlGenerator.cs
- XmlIncludeAttribute.cs
- ReceiveMessageRecord.cs
- UpdateTracker.cs
- ResourceProperty.cs
- DefinitionBase.cs
- ClientSettingsProvider.cs
- EdmToObjectNamespaceMap.cs
- CLSCompliantAttribute.cs
- InvalidOleVariantTypeException.cs
- PrintDialog.cs
- CatalogPartCollection.cs
- RegistryConfigurationProvider.cs
- _LocalDataStoreMgr.cs
- HostedTransportConfigurationBase.cs
- OleDbMetaDataFactory.cs
- DesignerSerializerAttribute.cs
- ProxyHelper.cs
- Run.cs
- QilExpression.cs
- CustomSignedXml.cs
- XhtmlConformanceSection.cs
- DispatcherHooks.cs
- XmlTextAttribute.cs
- SimpleMailWebEventProvider.cs
- OperationCanceledException.cs
- OutgoingWebResponseContext.cs
- DesignerSerializationOptionsAttribute.cs
- TypedTableBaseExtensions.cs
- ErrorProvider.cs
- PagesSection.cs
- MultiTrigger.cs
- DocumentOrderQuery.cs
- loginstatus.cs
- SortExpressionBuilder.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- DataGridViewTextBoxColumn.cs