Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / ProvidePropertyAttribute.cs / 1 / ProvidePropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public sealed class ProvidePropertyAttribute : Attribute { private readonly string propertyName; private readonly string receiverTypeName; ///Specifies which methods are extender /// properties. ////// public ProvidePropertyAttribute(string propertyName, Type receiverType) { this.propertyName = propertyName; this.receiverTypeName = receiverType.AssemblyQualifiedName; } ///Initializes a new instance of the ///class. /// public ProvidePropertyAttribute(string propertyName, string receiverTypeName) { this.propertyName = propertyName; this.receiverTypeName = receiverTypeName; } ///Initializes a new instance of the ///class. /// public string PropertyName { get { return propertyName; } } ////// Gets the name of a property that this class provides. /// ////// public string ReceiverTypeName { get { return receiverTypeName; } } ////// Gets the name of the data type this property can extend /// ////// public override object TypeId { get { return GetType().FullName + propertyName; } } public override bool Equals(object obj) { if (obj == this) { return true; } ProvidePropertyAttribute other = obj as ProvidePropertyAttribute; return (other != null) && other.propertyName == propertyName && other.receiverTypeName == receiverTypeName; } public override int GetHashCode() { return propertyName.GetHashCode() ^ receiverTypeName.GetHashCode(); } } }ProvidePropertyAttribute overrides this to include the type name and the property name ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeParameterDeclarationExpressionCollection.cs
- AppModelKnownContentFactory.cs
- ParameterCollection.cs
- ConfigurationManager.cs
- Utils.cs
- RoleManagerSection.cs
- SingletonInstanceContextProvider.cs
- DTCTransactionManager.cs
- Stack.cs
- CompilerWrapper.cs
- XPathNavigatorKeyComparer.cs
- ActivityDesigner.cs
- PeerTransportSecuritySettings.cs
- TextFormatterContext.cs
- X509Utils.cs
- ClientConfigurationSystem.cs
- TranslateTransform3D.cs
- Crypto.cs
- ListViewGroupConverter.cs
- StrokeCollectionDefaultValueFactory.cs
- ControlIdConverter.cs
- InputLanguageManager.cs
- SecurityElement.cs
- MimeWriter.cs
- PerfCounters.cs
- CodeTypeReferenceCollection.cs
- IListConverters.cs
- followingsibling.cs
- CodeBlockBuilder.cs
- CompilerTypeWithParams.cs
- SourceFileBuildProvider.cs
- SettingsAttributes.cs
- DBSchemaTable.cs
- ResourceSetExpression.cs
- CopyOnWriteList.cs
- LineGeometry.cs
- XhtmlBasicValidationSummaryAdapter.cs
- TableSectionStyle.cs
- HttpProfileBase.cs
- XPathNavigatorReader.cs
- RunInstallerAttribute.cs
- EntityConnection.cs
- DoubleLinkList.cs
- IdleTimeoutMonitor.cs
- Gdiplus.cs
- ValidationPropertyAttribute.cs
- Panel.cs
- bidPrivateBase.cs
- LinkUtilities.cs
- LayoutTableCell.cs
- RoleManagerEventArgs.cs
- XmlQueryContext.cs
- ContextMenuAutomationPeer.cs
- DbDataSourceEnumerator.cs
- WorkflowInstanceTerminatedRecord.cs
- Button.cs
- UnknownBitmapDecoder.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- AdRotatorDesigner.cs
- SqlDataSourceView.cs
- GeneralTransform2DTo3DTo2D.cs
- MultipartIdentifier.cs
- ManagementQuery.cs
- TableRow.cs
- DataGridViewComboBoxColumn.cs
- SqlCacheDependencyDatabaseCollection.cs
- AvTrace.cs
- StringPropertyBuilder.cs
- XmlException.cs
- SpecularMaterial.cs
- COM2ComponentEditor.cs
- StyleSheetComponentEditor.cs
- Ray3DHitTestResult.cs
- SizeChangedInfo.cs
- DoubleLinkList.cs
- ExceptionHelpers.cs
- EdmComplexTypeAttribute.cs
- IFlowDocumentViewer.cs
- Pair.cs
- NativeMethods.cs
- LocatorGroup.cs
- BinaryConverter.cs
- EntityViewGenerator.cs
- DataGridColumnEventArgs.cs
- DataKeyCollection.cs
- DataGridViewRow.cs
- WindowsScrollBarBits.cs
- Convert.cs
- TempFiles.cs
- BitmapEffect.cs
- EdmProperty.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SqlFactory.cs
- TemplatePropertyEntry.cs
- GroupBoxDesigner.cs
- TableParagraph.cs
- HandleCollector.cs
- WorkflowViewElement.cs
- HebrewCalendar.cs
- LineSegment.cs