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
- SecurityTokenAttachmentMode.cs
- InternalConfigHost.cs
- ResolvePPIDRequest.cs
- List.cs
- StylusPointPropertyUnit.cs
- FileRecordSequenceHelper.cs
- ConnectionManagementElement.cs
- OleDbMetaDataFactory.cs
- InvokePatternIdentifiers.cs
- QueueProcessor.cs
- RangeContentEnumerator.cs
- GeneralTransformGroup.cs
- dbenumerator.cs
- BitmapEffect.cs
- ZoneLinkButton.cs
- UserMapPath.cs
- RemoteWebConfigurationHostServer.cs
- RequestDescription.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- DataGridHeaderBorder.cs
- WindowsFormsEditorServiceHelper.cs
- TriggerCollection.cs
- DataGridClipboardCellContent.cs
- SpoolingTask.cs
- ServerValidateEventArgs.cs
- RenderDataDrawingContext.cs
- ImportCatalogPart.cs
- DataSourceProvider.cs
- DbProviderFactoriesConfigurationHandler.cs
- LoginCancelEventArgs.cs
- LinkArea.cs
- XamlTemplateSerializer.cs
- AnimationLayer.cs
- MetafileEditor.cs
- DashStyle.cs
- DbLambda.cs
- FrameworkObject.cs
- QueryStringParameter.cs
- ListItemConverter.cs
- TraceSource.cs
- StrokeCollection2.cs
- DocumentSequence.cs
- TreeViewEvent.cs
- SpStreamWrapper.cs
- BaseResourcesBuildProvider.cs
- arabicshape.cs
- RelatedCurrencyManager.cs
- BitmapDownload.cs
- TranslateTransform3D.cs
- ModifyActivitiesPropertyDescriptor.cs
- ErrorHandler.cs
- IncomingWebRequestContext.cs
- XpsImage.cs
- EventProviderClassic.cs
- ListViewItemSelectionChangedEvent.cs
- KeyConverter.cs
- StrongTypingException.cs
- BamlRecordReader.cs
- ComponentSerializationService.cs
- SplitterEvent.cs
- RelatedPropertyManager.cs
- RSACryptoServiceProvider.cs
- ToolStripDropDownButton.cs
- HostSecurityManager.cs
- ControlIdConverter.cs
- Vector3D.cs
- MarginsConverter.cs
- EllipseGeometry.cs
- DateTimeUtil.cs
- XmlUnspecifiedAttribute.cs
- HtmlControl.cs
- InlinedAggregationOperatorEnumerator.cs
- LongSumAggregationOperator.cs
- PageSettings.cs
- CodeIdentifier.cs
- DataControlFieldHeaderCell.cs
- ColorConverter.cs
- AttributeCollection.cs
- Token.cs
- Hashtable.cs
- LOSFormatter.cs
- LinkedResource.cs
- AuthenticationModuleElementCollection.cs
- ByteKeyFrameCollection.cs
- NumberFormatter.cs
- DataGridViewRowsRemovedEventArgs.cs
- CodeConditionStatement.cs
- ToolStripRenderEventArgs.cs
- CharUnicodeInfo.cs
- WebAdminConfigurationHelper.cs
- InternalCache.cs
- XsdDateTime.cs
- PreviewPrintController.cs
- SmiEventSink.cs
- BitStack.cs
- DataView.cs
- StatusCommandUI.cs
- Pkcs7Recipient.cs
- SRDisplayNameAttribute.cs
- SmtpDigestAuthenticationModule.cs