Code:
/ DotNET / DotNET / 8.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
- SubMenuStyle.cs
- Marshal.cs
- RegexNode.cs
- AliasGenerator.cs
- RuleAttributes.cs
- ContentTextAutomationPeer.cs
- XmlCustomFormatter.cs
- MemberBinding.cs
- PassportPrincipal.cs
- XmlTextReaderImplHelpers.cs
- ColorConverter.cs
- CodePrimitiveExpression.cs
- ImageMapEventArgs.cs
- StructuredTypeEmitter.cs
- EdmMember.cs
- WebResourceAttribute.cs
- PrivilegeNotHeldException.cs
- NativeMethods.cs
- CodeObject.cs
- TextSchema.cs
- EventLogger.cs
- TextChange.cs
- EntitySqlException.cs
- PerformanceCountersElement.cs
- NativeMethods.cs
- ILGen.cs
- StylusPlugin.cs
- OletxEnlistment.cs
- ProxySimple.cs
- XmlExceptionHelper.cs
- ConstantSlot.cs
- PolygonHotSpot.cs
- SqlTrackingService.cs
- elementinformation.cs
- SqlNamer.cs
- CustomPopupPlacement.cs
- TextParaClient.cs
- PermissionSet.cs
- ToolStripLabel.cs
- BufferAllocator.cs
- CodeLinePragma.cs
- SqlInternalConnectionSmi.cs
- Char.cs
- IpcPort.cs
- MemoryMappedView.cs
- Variable.cs
- TextViewSelectionProcessor.cs
- UnsafeMethods.cs
- SecurityRuntime.cs
- RowToFieldTransformer.cs
- LocatorBase.cs
- CodeMemberEvent.cs
- XmlUtil.cs
- HostedElements.cs
- OuterGlowBitmapEffect.cs
- LookupBindingPropertiesAttribute.cs
- CommonProperties.cs
- LinqDataSourceDeleteEventArgs.cs
- TemplateLookupAction.cs
- DataGridViewAccessibleObject.cs
- TransportChannelListener.cs
- ForEachAction.cs
- AvTrace.cs
- XmlElement.cs
- StrokeSerializer.cs
- EventPropertyMap.cs
- MexTcpBindingCollectionElement.cs
- ScriptResourceHandler.cs
- SqlDataSource.cs
- CompilerGlobalScopeAttribute.cs
- TrustLevelCollection.cs
- SystemIPv6InterfaceProperties.cs
- GacUtil.cs
- TextServicesProperty.cs
- DataGridViewCell.cs
- FormView.cs
- MemberListBinding.cs
- UnsafeNativeMethods.cs
- SimpleType.cs
- MenuEventArgs.cs
- SystemGatewayIPAddressInformation.cs
- Connector.cs
- GeneralTransformGroup.cs
- AttributeParameterInfo.cs
- WebBrowsableAttribute.cs
- ElementHostPropertyMap.cs
- SectionVisual.cs
- TrackingServices.cs
- PolicyDesigner.cs
- DetailsViewDeletedEventArgs.cs
- ITreeGenerator.cs
- OutputCacheProfile.cs
- SQLInt64.cs
- MemberAccessException.cs
- StatusBarPanel.cs
- AutoGeneratedFieldProperties.cs
- UnitySerializationHolder.cs
- CanExpandCollapseAllConverter.cs
- Stroke2.cs
- ScrollData.cs