Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / ProvidePropertyAttribute.cs / 1 / 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(); } } }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
- HMACSHA1.cs
- RtfControls.cs
- AutomationIdentifierGuids.cs
- SettingsProviderCollection.cs
- basevalidator.cs
- AttachedAnnotationChangedEventArgs.cs
- AnimationException.cs
- SqlNode.cs
- ResourceKey.cs
- TransformCryptoHandle.cs
- RotateTransform.cs
- ProcessInfo.cs
- Point3DAnimation.cs
- ArrayHelper.cs
- RegexParser.cs
- EdmValidator.cs
- UrlPath.cs
- AmbientLight.cs
- TransactionChannelFaultConverter.cs
- BinaryNode.cs
- SecurityAlgorithmSuite.cs
- XmlBinaryReader.cs
- TcpConnectionPoolSettingsElement.cs
- FocusManager.cs
- DataQuery.cs
- PackUriHelper.cs
- EmissiveMaterial.cs
- EventDescriptorCollection.cs
- StrokeRenderer.cs
- GlyphRun.cs
- ResourceAttributes.cs
- TreeNodeEventArgs.cs
- WebPartManagerInternals.cs
- ServiceOperationParameter.cs
- HttpFileCollection.cs
- UndoManager.cs
- Compilation.cs
- MetadataProperty.cs
- DataSourceControlBuilder.cs
- IntegrationExceptionEventArgs.cs
- InfocardExtendedInformationCollection.cs
- ProjectionPlan.cs
- GridProviderWrapper.cs
- WebResponse.cs
- LogLogRecordHeader.cs
- TypedElement.cs
- CLRBindingWorker.cs
- WebReferencesBuildProvider.cs
- RotateTransform.cs
- SqlDataSourceFilteringEventArgs.cs
- ExpressionBuilderCollection.cs
- SystemTcpStatistics.cs
- wgx_exports.cs
- MouseOverProperty.cs
- CompositeScriptReference.cs
- WindowsEditBoxRange.cs
- Int16KeyFrameCollection.cs
- SQLResource.cs
- TcpTransportManager.cs
- FormatterConverter.cs
- CryptoHelper.cs
- SecurityTokenResolver.cs
- HttpProfileBase.cs
- WebPartDisplayModeCancelEventArgs.cs
- ExpandedWrapper.cs
- XmlILIndex.cs
- XmlConvert.cs
- AuthenticationManager.cs
- MouseCaptureWithinProperty.cs
- Interlocked.cs
- RecognizerStateChangedEventArgs.cs
- VisualBrush.cs
- X500Name.cs
- DBCommand.cs
- InstallerTypeAttribute.cs
- FragmentNavigationEventArgs.cs
- XmlAttributeCache.cs
- SortKey.cs
- CompoundFileStorageReference.cs
- X509KeyIdentifierClauseType.cs
- DescendantBaseQuery.cs
- Soap.cs
- _TransmitFileOverlappedAsyncResult.cs
- MemoryFailPoint.cs
- XmlReflectionImporter.cs
- ProfileSettingsCollection.cs
- TdsParserHelperClasses.cs
- AuthorizationRule.cs
- MenuItemStyle.cs
- InvalidEnumArgumentException.cs
- NameValueConfigurationElement.cs
- ServiceDeploymentInfo.cs
- SiteMap.cs
- Utility.cs
- AndCondition.cs
- PreviewControlDesigner.cs
- Base64Stream.cs
- DefaultProxySection.cs
- TransformerInfo.cs
- ResourceManager.cs