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
- WebPartDisplayModeCollection.cs
- BitmapEffectDrawing.cs
- SystemResourceHost.cs
- SimpleApplicationHost.cs
- CompatibleIComparer.cs
- ByteStreamMessageEncodingElement.cs
- KeyToListMap.cs
- StreamProxy.cs
- TextAction.cs
- MasterPageBuildProvider.cs
- Message.cs
- DataBoundControlAdapter.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- ConfigPathUtility.cs
- WebPartUtil.cs
- bidPrivateBase.cs
- DiscardableAttribute.cs
- SafeNativeMethods.cs
- WebPartExportVerb.cs
- Int64.cs
- RenderData.cs
- Menu.cs
- SecurityContext.cs
- SendMailErrorEventArgs.cs
- ClientRolePrincipal.cs
- CompilerErrorCollection.cs
- PreloadHost.cs
- XmlSchemaAnnotated.cs
- NaturalLanguageHyphenator.cs
- ConfigurationLocation.cs
- SiteIdentityPermission.cs
- CommandManager.cs
- NativeMethods.cs
- WebPartTracker.cs
- MultiByteCodec.cs
- ControlPropertyNameConverter.cs
- ObjectReaderCompiler.cs
- BitVector32.cs
- FileSystemEnumerable.cs
- SrgsSemanticInterpretationTag.cs
- SafeEventLogWriteHandle.cs
- HttpModule.cs
- DocumentEventArgs.cs
- LinqDataSourceEditData.cs
- UInt32Storage.cs
- FactoryGenerator.cs
- SHA1.cs
- InboundActivityHelper.cs
- PageRanges.cs
- HashCodeCombiner.cs
- UnsettableComboBox.cs
- SqlClientWrapperSmiStream.cs
- StandardBindingCollectionElement.cs
- basevalidator.cs
- XmlReflectionImporter.cs
- ConfigurationElement.cs
- WebPermission.cs
- NativeMethodsCLR.cs
- SchemaCollectionCompiler.cs
- SqlInternalConnectionSmi.cs
- PropertyRef.cs
- IOException.cs
- DefinitionUpdate.cs
- BrushValueSerializer.cs
- X509Chain.cs
- InputBindingCollection.cs
- Padding.cs
- CompressionTransform.cs
- SignatureToken.cs
- MetaType.cs
- BlockingCollection.cs
- UserControlBuildProvider.cs
- VectorKeyFrameCollection.cs
- TextChangedEventArgs.cs
- SortedList.cs
- RequestTimeoutManager.cs
- LockedHandleGlyph.cs
- SequenceDesigner.cs
- ipaddressinformationcollection.cs
- SurrogateEncoder.cs
- xsdvalidator.cs
- DataServiceHostWrapper.cs
- ManualResetEvent.cs
- CancellationState.cs
- MediaContext.cs
- PermissionListSet.cs
- RelationshipEndMember.cs
- SQLByteStorage.cs
- SiteMembershipCondition.cs
- PrintController.cs
- LeafCellTreeNode.cs
- CommandSet.cs
- EdmTypeAttribute.cs
- LayoutManager.cs
- TemplatePropertyEntry.cs
- XmlQueryOutput.cs
- FontCacheUtil.cs
- DataGridViewColumn.cs
- LinkGrep.cs
- ObjectToken.cs