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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbConnectionFactory.cs
- CompilerResults.cs
- RegexCharClass.cs
- ServiceDescriptionSerializer.cs
- DataKeyCollection.cs
- PageAdapter.cs
- GridViewColumnHeaderAutomationPeer.cs
- HtmlInputFile.cs
- webeventbuffer.cs
- CodeTypeMember.cs
- XmlChoiceIdentifierAttribute.cs
- SessionStateModule.cs
- Int64Converter.cs
- IndentedTextWriter.cs
- HtmlFormWrapper.cs
- NetSectionGroup.cs
- DataControlLinkButton.cs
- XmlSchemaValidator.cs
- DataGridTextBoxColumn.cs
- UserPreferenceChangedEventArgs.cs
- Wildcard.cs
- RandomNumberGenerator.cs
- CompositeFontFamily.cs
- ValidationRuleCollection.cs
- SQLBinaryStorage.cs
- CollaborationHelperFunctions.cs
- InlineCollection.cs
- PowerModeChangedEventArgs.cs
- Identity.cs
- OutputCacheProfileCollection.cs
- XmlToDatasetMap.cs
- PrivateFontCollection.cs
- SizeKeyFrameCollection.cs
- CompilerState.cs
- GridViewColumnCollectionChangedEventArgs.cs
- MobileControlDesigner.cs
- GeneralTransform3DGroup.cs
- PagedDataSource.cs
- PenThread.cs
- ToolStripPanelDesigner.cs
- DataRowExtensions.cs
- IntSecurity.cs
- ValidationPropertyAttribute.cs
- CssStyleCollection.cs
- DbReferenceCollection.cs
- SettingsPropertyValueCollection.cs
- EventLogEntryCollection.cs
- CollectionView.cs
- UncommonField.cs
- NumberSubstitution.cs
- MasterPageBuildProvider.cs
- InvalidContentTypeException.cs
- FlowDocumentPaginator.cs
- TransformDescriptor.cs
- LabelDesigner.cs
- ServiceReference.cs
- BitConverter.cs
- SystemWebSectionGroup.cs
- Completion.cs
- ResourceLoader.cs
- ObservableCollectionDefaultValueFactory.cs
- StylusEditingBehavior.cs
- UnmanagedMemoryStreamWrapper.cs
- StrongNameHelpers.cs
- XsltConvert.cs
- XmlName.cs
- PrePrepareMethodAttribute.cs
- ColorDialog.cs
- DataGridViewCellPaintingEventArgs.cs
- TiffBitmapEncoder.cs
- DeclarativeCatalogPart.cs
- RowToParametersTransformer.cs
- SqlDataSourceCustomCommandEditor.cs
- CompiledQuery.cs
- Misc.cs
- Int64KeyFrameCollection.cs
- CodeParameterDeclarationExpression.cs
- DoubleAnimationUsingKeyFrames.cs
- ConfigurationSectionGroup.cs
- WmlValidationSummaryAdapter.cs
- CodeValidator.cs
- SoapDocumentServiceAttribute.cs
- TableLayoutColumnStyleCollection.cs
- AsyncCallback.cs
- Misc.cs
- DockingAttribute.cs
- SignerInfo.cs
- HyperLinkField.cs
- DataSourceCacheDurationConverter.cs
- DesignTable.cs
- ContextMarshalException.cs
- ItemsControl.cs
- SmtpAuthenticationManager.cs
- X509ClientCertificateAuthentication.cs
- VirtualPathProvider.cs
- DivideByZeroException.cs
- CompressionTransform.cs
- BatchParser.cs
- StateBag.cs
- LogicalExpressionTypeConverter.cs