Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- GridViewSelectEventArgs.cs
- WsdlInspector.cs
- SchemaSetCompiler.cs
- SqlTrackingQuery.cs
- Atom10ItemFormatter.cs
- ElementHostPropertyMap.cs
- DataGridViewComboBoxEditingControl.cs
- Baml2006Reader.cs
- ManagedWndProcTracker.cs
- InvalidateEvent.cs
- SqlFileStream.cs
- HelpExampleGenerator.cs
- InvokeMemberBinder.cs
- Button.cs
- Mappings.cs
- EnvironmentPermission.cs
- BindingList.cs
- baseaxisquery.cs
- QueryCursorEventArgs.cs
- CannotUnloadAppDomainException.cs
- BindingExpressionUncommonField.cs
- DrawListViewItemEventArgs.cs
- Blend.cs
- EncryptedPackage.cs
- SiteMapSection.cs
- StringConverter.cs
- HostingEnvironmentSection.cs
- AllMembershipCondition.cs
- HttpClientProtocol.cs
- EventData.cs
- AtomContentProperty.cs
- ChildChangedEventArgs.cs
- InputMethodStateChangeEventArgs.cs
- WebFaultClientMessageInspector.cs
- UnsafeNativeMethods.cs
- CornerRadiusConverter.cs
- UInt64Converter.cs
- _BaseOverlappedAsyncResult.cs
- Int32RectValueSerializer.cs
- ArrangedElementCollection.cs
- CalendarTable.cs
- CurrencyWrapper.cs
- StoreItemCollection.Loader.cs
- ItemPager.cs
- FirstMatchCodeGroup.cs
- WebExceptionStatus.cs
- HttpDictionary.cs
- CodeConditionStatement.cs
- RulePatternOps.cs
- CommandEventArgs.cs
- CommandBinding.cs
- CodeGen.cs
- OdbcInfoMessageEvent.cs
- PassportAuthenticationModule.cs
- TypePresenter.xaml.cs
- ProfilePropertySettingsCollection.cs
- Page.cs
- ACE.cs
- TemplateXamlTreeBuilder.cs
- BaseValidator.cs
- PropertyEmitter.cs
- HwndHostAutomationPeer.cs
- SimpleBitVector32.cs
- BinaryHeap.cs
- ConnectionInterfaceCollection.cs
- MultiView.cs
- CollectionView.cs
- TimeSpanFormat.cs
- MarkupCompiler.cs
- XslAstAnalyzer.cs
- PersonalizationProvider.cs
- DispatcherFrame.cs
- InternalsVisibleToAttribute.cs
- EntityPropertyMappingAttribute.cs
- ConfigurationManagerHelper.cs
- LogAppendAsyncResult.cs
- SemanticBasicElement.cs
- SizeIndependentAnimationStorage.cs
- EventManager.cs
- EventlogProvider.cs
- OdbcEnvironmentHandle.cs
- EmissiveMaterial.cs
- ScaleTransform3D.cs
- DataService.cs
- future.cs
- FormViewPageEventArgs.cs
- UserControl.cs
- HtmlFormWrapper.cs
- ForceCopyBuildProvider.cs
- RecordManager.cs
- TargetConverter.cs
- SqlStream.cs
- NoClickablePointException.cs
- ImpersonationContext.cs
- LocatorPartList.cs
- ValueTypeFixupInfo.cs
- InputLangChangeEvent.cs
- AuthenticatedStream.cs
- RegionInfo.cs
- PerspectiveCamera.cs