Code:
/ 4.0 / 4.0 / 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 ///// 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
- WebWorkflowRole.cs
- MessageHeaders.cs
- ZipFileInfo.cs
- StructuralCache.cs
- ConfigurationManagerHelper.cs
- SafeFileMapViewHandle.cs
- MdiWindowListItemConverter.cs
- DataSourceCache.cs
- UdpConstants.cs
- SqlTopReducer.cs
- DesignerView.xaml.cs
- XmlWriter.cs
- OleDbEnumerator.cs
- SecurityResources.cs
- UInt32Converter.cs
- WCFBuildProvider.cs
- DataGridItemCollection.cs
- SystemEvents.cs
- XmlSchemaGroupRef.cs
- ExpressionSelection.cs
- ContractListAdapter.cs
- RolePrincipal.cs
- mediaeventargs.cs
- __TransparentProxy.cs
- ParallelLoopState.cs
- DbDeleteCommandTree.cs
- LocalizationComments.cs
- Stylus.cs
- MSG.cs
- ObjectListDesigner.cs
- MultiTrigger.cs
- RuntimeWrappedException.cs
- GroupBoxRenderer.cs
- ObjectItemCollection.cs
- TypefaceCollection.cs
- BulletedListEventArgs.cs
- SoapAttributes.cs
- Types.cs
- FontStyle.cs
- XmlValueConverter.cs
- TypeBrowserDialog.cs
- ZipPackage.cs
- ResourcePart.cs
- InputManager.cs
- StandardMenuStripVerb.cs
- PointValueSerializer.cs
- SelectionWordBreaker.cs
- FieldBuilder.cs
- _SSPISessionCache.cs
- NodeFunctions.cs
- Rights.cs
- AppDomainAttributes.cs
- IIS7UserPrincipal.cs
- DefaultBinder.cs
- Transform.cs
- MessageDesigner.cs
- LineGeometry.cs
- PassportAuthentication.cs
- FileNameEditor.cs
- PolicyManager.cs
- TypeDescriptor.cs
- SystemGatewayIPAddressInformation.cs
- DataObjectSettingDataEventArgs.cs
- nulltextnavigator.cs
- BitmapMetadataBlob.cs
- Duration.cs
- RealizationDrawingContextWalker.cs
- ListChangedEventArgs.cs
- InputLanguageCollection.cs
- SiteMap.cs
- GenericTextProperties.cs
- SoapEnumAttribute.cs
- ButtonRenderer.cs
- DbSetClause.cs
- TextStore.cs
- Color.cs
- ProcessThread.cs
- TokenFactoryBase.cs
- DecimalAnimation.cs
- TextServicesContext.cs
- TileModeValidation.cs
- UnauthorizedAccessException.cs
- PiiTraceSource.cs
- OperationInvokerTrace.cs
- ChtmlLinkAdapter.cs
- StorageModelBuildProvider.cs
- ProgressChangedEventArgs.cs
- XmlNamespaceMapping.cs
- AutomationPropertyInfo.cs
- MenuItemCollection.cs
- UpdateProgress.cs
- AnimationTimeline.cs
- ActivationArguments.cs
- SqlAggregateChecker.cs
- ExpressionSelection.cs
- DbConnectionClosed.cs
- AnnotationResourceChangedEventArgs.cs
- WindowsListView.cs
- FormViewInsertEventArgs.cs
- XPathNodeIterator.cs