Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ProvidePropertyAttribute.cs / 1305376 / 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.ProvidePropertyAttribute overrides this to include the type name and the property name ///
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ComAwareEventInfo.cs
- SHA512Managed.cs
- WindowProviderWrapper.cs
- DateTimeStorage.cs
- TreeViewDesigner.cs
- SocketSettings.cs
- ObjectList.cs
- ToolboxDataAttribute.cs
- XdrBuilder.cs
- SkipStoryboardToFill.cs
- IndexOutOfRangeException.cs
- PrePrepareMethodAttribute.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ModuleBuilderData.cs
- WindowsListViewItemStartMenu.cs
- GridViewRowPresenterBase.cs
- ViewStateChangedEventArgs.cs
- Calendar.cs
- SafePEFileHandle.cs
- PrintPreviewControl.cs
- ResourceReferenceExpressionConverter.cs
- LowerCaseStringConverter.cs
- ASCIIEncoding.cs
- SimpleRecyclingCache.cs
- URIFormatException.cs
- __TransparentProxy.cs
- WindowsProgressbar.cs
- SqlDataRecord.cs
- StatusBarDrawItemEvent.cs
- DataRowView.cs
- RowsCopiedEventArgs.cs
- SQLSingleStorage.cs
- PasswordRecoveryDesigner.cs
- UseManagedPresentationBindingElementImporter.cs
- XmlCharCheckingWriter.cs
- TransformConverter.cs
- ServiceModelSecurityTokenTypes.cs
- ObjectToken.cs
- ValidationResult.cs
- BuilderPropertyEntry.cs
- SortedList.cs
- SubMenuStyleCollectionEditor.cs
- TableItemProviderWrapper.cs
- FrameDimension.cs
- TextParagraph.cs
- DataRelation.cs
- StringKeyFrameCollection.cs
- InvalidBodyAccessException.cs
- ListBoxAutomationPeer.cs
- CompositeClientFormatter.cs
- Activator.cs
- ToolStripOverflowButton.cs
- ElementNotEnabledException.cs
- DBBindings.cs
- DiscoveryServerProtocol.cs
- TdsParameterSetter.cs
- HuffmanTree.cs
- Function.cs
- KeyTimeConverter.cs
- BufferedGenericXmlSecurityToken.cs
- TimelineGroup.cs
- IsolatedStorageFileStream.cs
- RoutedCommand.cs
- XsdDuration.cs
- DataMemberFieldEditor.cs
- DataGridViewCellLinkedList.cs
- AssociatedControlConverter.cs
- TextureBrush.cs
- XmlWriterSettings.cs
- TransformConverter.cs
- UpdatePanelTrigger.cs
- TextEndOfParagraph.cs
- Clock.cs
- DataGridCheckBoxColumn.cs
- SelectionProviderWrapper.cs
- ImageEditor.cs
- XamlSerializationHelper.cs
- WebSysDescriptionAttribute.cs
- Int32Collection.cs
- ConditionalAttribute.cs
- XmlSerializerAssemblyAttribute.cs
- FormatConvertedBitmap.cs
- TdsParser.cs
- TableLayoutStyleCollection.cs
- FaultContractInfo.cs
- SecondaryViewProvider.cs
- SingleStorage.cs
- RectangleConverter.cs
- X509CertificateCollection.cs
- ProtocolsConfiguration.cs
- ShaderEffect.cs
- PriorityRange.cs
- AppDomainUnloadedException.cs
- RightsManagementEncryptedStream.cs
- Configuration.cs
- UnauthorizedWebPart.cs
- ToolStripDropDownClosingEventArgs.cs
- FixedPageStructure.cs
- ValueSerializerAttribute.cs
- PKCS1MaskGenerationMethod.cs