Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ // // 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Encoder.cs
- Point3DConverter.cs
- SoapObjectInfo.cs
- LineServicesRun.cs
- SelectionPattern.cs
- UInt32.cs
- TemplateControlBuildProvider.cs
- NonParentingControl.cs
- SamlAssertion.cs
- NamespaceList.cs
- CachedCompositeFamily.cs
- DesignerForm.cs
- XXXInfos.cs
- SystemUdpStatistics.cs
- EventProviderBase.cs
- isolationinterop.cs
- InternalUserCancelledException.cs
- XPathBinder.cs
- DbDeleteCommandTree.cs
- PointAnimationClockResource.cs
- XmlSchemaSet.cs
- SimpleWebHandlerParser.cs
- SynthesizerStateChangedEventArgs.cs
- ListBindableAttribute.cs
- MaskedTextProvider.cs
- DeclaredTypeElement.cs
- SubMenuStyle.cs
- OdbcDataAdapter.cs
- Panel.cs
- WorkflowServiceInstance.cs
- WebServiceMethodData.cs
- DataGridViewColumn.cs
- ProtectedProviderSettings.cs
- TimeoutException.cs
- HashSetEqualityComparer.cs
- RemoveStoryboard.cs
- MarkupExtensionSerializer.cs
- CodeSubDirectory.cs
- HttpWebResponse.cs
- securitymgrsite.cs
- SourceElementsCollection.cs
- Array.cs
- ExpressionBuilder.cs
- mediaeventargs.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- WinCategoryAttribute.cs
- PolygonHotSpot.cs
- CodeMemberField.cs
- EdmPropertyAttribute.cs
- SystemWebSectionGroup.cs
- StrongNameSignatureInformation.cs
- ObjectCloneHelper.cs
- _IPv4Address.cs
- IsolatedStorageFileStream.cs
- TextEffectCollection.cs
- HelpProvider.cs
- TextTreeTextBlock.cs
- DetailsViewPageEventArgs.cs
- DescriptionAttribute.cs
- PageParserFilter.cs
- CodeTypeConstructor.cs
- DesignColumn.cs
- TransformerInfoCollection.cs
- GatewayIPAddressInformationCollection.cs
- PresentationSource.cs
- WindowCollection.cs
- JapaneseCalendar.cs
- CustomValidator.cs
- ParallelTimeline.cs
- TextServicesDisplayAttributePropertyRanges.cs
- ConfigXmlWhitespace.cs
- CultureData.cs
- TypeUnloadedException.cs
- QueryStringHandler.cs
- CurrentChangingEventManager.cs
- LineUtil.cs
- DataGridToolTip.cs
- ValidatorCollection.cs
- ChangeBlockUndoRecord.cs
- CapabilitiesState.cs
- XmlBinaryReader.cs
- ErrorEventArgs.cs
- ConfigurationManagerHelperFactory.cs
- XmlAnyAttributeAttribute.cs
- ToolStripItemEventArgs.cs
- WindowsSysHeader.cs
- Pen.cs
- CompoundFileReference.cs
- IIS7WorkerRequest.cs
- HttpHandlerAction.cs
- TableLayoutStyle.cs
- UnmanagedMemoryStreamWrapper.cs
- Atom10FormatterFactory.cs
- LookupBindingPropertiesAttribute.cs
- DataSourceXmlTextReader.cs
- BindingCompleteEventArgs.cs
- OuterGlowBitmapEffect.cs
- DataControlFieldCollection.cs
- DataSetUtil.cs
- TransformDescriptor.cs