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
- ControlBuilderAttribute.cs
- CompositeCollection.cs
- oledbconnectionstring.cs
- XsdDateTime.cs
- ButtonBaseAdapter.cs
- X509ChainPolicy.cs
- BitConverter.cs
- RootCodeDomSerializer.cs
- BitmapPalettes.cs
- Rotation3DKeyFrameCollection.cs
- File.cs
- DocumentXPathNavigator.cs
- DocumentViewer.cs
- WebPartConnectionsCancelEventArgs.cs
- Int64.cs
- _Semaphore.cs
- RecordConverter.cs
- SvcMapFileSerializer.cs
- cookiecontainer.cs
- MappingItemCollection.cs
- SiteMapNode.cs
- TileBrush.cs
- ComponentResourceKey.cs
- CodeCatchClauseCollection.cs
- Hex.cs
- DataServiceRequestException.cs
- SubMenuStyleCollection.cs
- AppDomainGrammarProxy.cs
- ReadOnlyMetadataCollection.cs
- SchemaImporterExtensionElement.cs
- Empty.cs
- exports.cs
- DrawingCollection.cs
- BindingValueChangedEventArgs.cs
- Delay.cs
- Expression.cs
- DataProtection.cs
- Border.cs
- CollectionDataContract.cs
- FaultHandlingFilter.cs
- CollectionViewProxy.cs
- _emptywebproxy.cs
- XhtmlBasicImageAdapter.cs
- CollectionView.cs
- EdmComplexTypeAttribute.cs
- BinaryParser.cs
- RepeatBehavior.cs
- DataRowCollection.cs
- TextSearch.cs
- BasicBrowserDialog.designer.cs
- WebProxyScriptElement.cs
- __ComObject.cs
- FlowPosition.cs
- baseaxisquery.cs
- HMACSHA512.cs
- StreamGeometry.cs
- DataGridViewTopRowAccessibleObject.cs
- SqlXmlStorage.cs
- ValidationRuleCollection.cs
- WebHttpBindingCollectionElement.cs
- SafeArrayRankMismatchException.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- recordstate.cs
- Gdiplus.cs
- SqlGatherProducedAliases.cs
- MethodCallTranslator.cs
- QilStrConcatenator.cs
- MemberDomainMap.cs
- ClientConfigPaths.cs
- AttachmentService.cs
- ActiveXSite.cs
- PartitionerQueryOperator.cs
- DmlSqlGenerator.cs
- MatrixTransform3D.cs
- EventLogEntry.cs
- XmlSchemaSimpleTypeList.cs
- Icon.cs
- StorageEntitySetMapping.cs
- Parallel.cs
- ObjectQueryState.cs
- ApplicationDirectory.cs
- MatrixConverter.cs
- ServiceInstanceProvider.cs
- CompressionTransform.cs
- ComIntegrationManifestGenerator.cs
- SimpleTypeResolver.cs
- OleAutBinder.cs
- BuildManagerHost.cs
- Pool.cs
- Variant.cs
- XNameTypeConverter.cs
- ReadOnlyCollectionBase.cs
- WebControl.cs
- MessagePropertyDescriptionCollection.cs
- UnwrappedTypesXmlSerializerManager.cs
- PriorityQueue.cs
- UrlMappingsSection.cs
- GlyphRun.cs
- RelatedPropertyManager.cs
- SrgsElementFactoryCompiler.cs