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
- TextEndOfParagraph.cs
- AttachedAnnotationChangedEventArgs.cs
- ProviderManager.cs
- CompilerParameters.cs
- BoundsDrawingContextWalker.cs
- WinEventQueueItem.cs
- EventArgs.cs
- BitmapCache.cs
- ThreadAttributes.cs
- UriWriter.cs
- LazyTextWriterCreator.cs
- ListSortDescription.cs
- DockPanel.cs
- TableLayoutPanelCellPosition.cs
- QilLoop.cs
- _NestedMultipleAsyncResult.cs
- AspNetRouteServiceHttpHandler.cs
- CalendarDataBindingHandler.cs
- ExpressionEditor.cs
- EditorPartDesigner.cs
- SizeConverter.cs
- DataAdapter.cs
- CqlGenerator.cs
- Icon.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- SqlIdentifier.cs
- lengthconverter.cs
- MetadataArtifactLoaderFile.cs
- PageParserFilter.cs
- ActiveXSite.cs
- FileStream.cs
- SmiConnection.cs
- WebPartZone.cs
- HttpPostClientProtocol.cs
- ConversionValidationRule.cs
- WindowsRegion.cs
- input.cs
- EntityDataSource.cs
- DateTimeSerializationSection.cs
- MSAAEventDispatcher.cs
- XmlAttribute.cs
- Floater.cs
- SchemaNotation.cs
- FileBasedResourceGroveler.cs
- TablePattern.cs
- UnhandledExceptionEventArgs.cs
- CreateParams.cs
- DataShape.cs
- Rotation3D.cs
- DesignBindingConverter.cs
- HttpCookieCollection.cs
- HwndTarget.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- PolicyLevel.cs
- RegisteredScript.cs
- QilIterator.cs
- FixedTextPointer.cs
- DataGridCommandEventArgs.cs
- ConfigurationElementProperty.cs
- TabItemWrapperAutomationPeer.cs
- DesignSurfaceManager.cs
- SqlTypesSchemaImporter.cs
- FileDialogCustomPlace.cs
- WSSecurityJan2004.cs
- Transform.cs
- ApplicationInterop.cs
- AllMembershipCondition.cs
- CodeConstructor.cs
- DSASignatureFormatter.cs
- HMAC.cs
- XmlSerializerVersionAttribute.cs
- Hash.cs
- WebBrowser.cs
- DiscoveryDefaults.cs
- CompositionTarget.cs
- nulltextcontainer.cs
- WindowsRebar.cs
- SafeEventLogReadHandle.cs
- NullableDecimalMinMaxAggregationOperator.cs
- Page.cs
- IteratorDescriptor.cs
- RemotingConfiguration.cs
- BufferModesCollection.cs
- DefaultPrintController.cs
- DbBuffer.cs
- GeneralTransformCollection.cs
- CommandHelpers.cs
- ApplicationDirectoryMembershipCondition.cs
- DbConnectionInternal.cs
- WorkflowRuntimeServiceElementCollection.cs
- ValidatingCollection.cs
- TreeViewAutomationPeer.cs
- LinearGradientBrush.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ToolStripContainerActionList.cs
- TextComposition.cs
- IisTraceListener.cs
- EntityDataSourceSelectedEventArgs.cs
- ZipFileInfoCollection.cs
- WebPartMinimizeVerb.cs