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
- ToolStripItemEventArgs.cs
- SqlDataSourceQueryConverter.cs
- DesignerSerializerAttribute.cs
- DataContractSerializer.cs
- UnitySerializationHolder.cs
- UriSection.cs
- SQLByteStorage.cs
- ActiveDocumentEvent.cs
- ManageRequest.cs
- PermissionRequestEvidence.cs
- UrlAuthorizationModule.cs
- CodeExporter.cs
- MetadataItemSerializer.cs
- AppDomainUnloadedException.cs
- PeerContact.cs
- ReservationNotFoundException.cs
- FileDialogCustomPlacesCollection.cs
- SynchronizationFilter.cs
- InputLanguageEventArgs.cs
- ConfigDefinitionUpdates.cs
- XmlDataLoader.cs
- SplashScreenNativeMethods.cs
- InheritanceContextChangedEventManager.cs
- SimpleRecyclingCache.cs
- DataControlLinkButton.cs
- StateRuntime.cs
- StandardToolWindows.cs
- CrossContextChannel.cs
- Profiler.cs
- DriveInfo.cs
- designeractionbehavior.cs
- MappingSource.cs
- DebugController.cs
- HttpWrapper.cs
- CompositeControl.cs
- PasswordBox.cs
- OptimisticConcurrencyException.cs
- SQLBinaryStorage.cs
- SqlGatherProducedAliases.cs
- COMException.cs
- DataGridViewButtonCell.cs
- BitmapFrameEncode.cs
- Tuple.cs
- DataSourceControl.cs
- COM2ComponentEditor.cs
- EdmComplexPropertyAttribute.cs
- CounterSampleCalculator.cs
- WebPartTransformerCollection.cs
- PerformanceCounterManager.cs
- CompiledRegexRunnerFactory.cs
- WindowsPrincipal.cs
- FontConverter.cs
- HitTestParameters.cs
- ETagAttribute.cs
- ProcessRequestArgs.cs
- HtmlInputRadioButton.cs
- DesignerAttribute.cs
- AgileSafeNativeMemoryHandle.cs
- CompileXomlTask.cs
- CallContext.cs
- WindowsListViewItemCheckBox.cs
- MessageBox.cs
- ParagraphResult.cs
- ContractComponent.cs
- BitmapFrame.cs
- MultiBindingExpression.cs
- CodeTypeParameter.cs
- SafeViewOfFileHandle.cs
- CountdownEvent.cs
- coordinatorscratchpad.cs
- SimpleRecyclingCache.cs
- InsufficientMemoryException.cs
- TransformGroup.cs
- SqlCommandSet.cs
- CellIdBoolean.cs
- ClipboardProcessor.cs
- IncomingWebRequestContext.cs
- HwndKeyboardInputProvider.cs
- ReferenceService.cs
- Renderer.cs
- SslStream.cs
- ToolboxItemFilterAttribute.cs
- ProfileEventArgs.cs
- RemoteHelper.cs
- BaseDataList.cs
- ResolveDuplex11AsyncResult.cs
- EventPropertyMap.cs
- DocumentXmlWriter.cs
- FastPropertyAccessor.cs
- EditModeSwitchButton.cs
- HotCommands.cs
- EFColumnProvider.cs
- Win32KeyboardDevice.cs
- MaskedTextProvider.cs
- Html32TextWriter.cs
- MethodExpr.cs
- DuplicateWaitObjectException.cs
- ScriptingRoleServiceSection.cs
- ColumnCollection.cs
- MemberAccessException.cs