Code:
/ 4.0 / 4.0 / 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 ///// 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
- MetadataPropertyvalue.cs
- DesignTimeSiteMapProvider.cs
- HwndStylusInputProvider.cs
- CodeDomConfigurationHandler.cs
- TextBoxRenderer.cs
- SortKey.cs
- ProfileModule.cs
- shaperfactory.cs
- ValueQuery.cs
- XsdBuilder.cs
- OdbcRowUpdatingEvent.cs
- SecUtil.cs
- SiteOfOriginPart.cs
- TypeSystem.cs
- SelectionHighlightInfo.cs
- InvalidPropValue.cs
- ColumnMapProcessor.cs
- DefaultShape.cs
- ClientScriptManager.cs
- COM2ExtendedTypeConverter.cs
- ServiceMetadataPublishingElement.cs
- RestHandlerFactory.cs
- TypeUtil.cs
- PrtCap_Base.cs
- ContainerUIElement3D.cs
- AppearanceEditorPart.cs
- RequestReplyCorrelator.cs
- BinaryParser.cs
- MobileRedirect.cs
- DesignerSerializationManager.cs
- BitmapEffectDrawingContent.cs
- ObjectHandle.cs
- SchemaNamespaceManager.cs
- FormsAuthenticationTicket.cs
- PropertyEmitterBase.cs
- Polyline.cs
- LocalFileSettingsProvider.cs
- Processor.cs
- FixedTextSelectionProcessor.cs
- DataGridItemCollection.cs
- CategoryAttribute.cs
- PositiveTimeSpanValidator.cs
- ClientEventManager.cs
- ThumbAutomationPeer.cs
- WasAdminWrapper.cs
- ClockController.cs
- VideoDrawing.cs
- ThreadAttributes.cs
- Group.cs
- Button.cs
- Vector3DKeyFrameCollection.cs
- XmlSchema.cs
- DataGridViewCellParsingEventArgs.cs
- Empty.cs
- BaseTemplateParser.cs
- DataGridViewHeaderCell.cs
- CommandEventArgs.cs
- DataTableMapping.cs
- ClosableStream.cs
- CFStream.cs
- XmlUtil.cs
- ListDictionaryInternal.cs
- ApplicationFileCodeDomTreeGenerator.cs
- CatchBlock.cs
- PrintingPermissionAttribute.cs
- Menu.cs
- PointCollectionConverter.cs
- SortExpressionBuilder.cs
- EventSetter.cs
- AVElementHelper.cs
- OdbcEnvironmentHandle.cs
- CultureMapper.cs
- ItemDragEvent.cs
- BamlRecords.cs
- EntityObject.cs
- SerTrace.cs
- PauseStoryboard.cs
- FileDialog_Vista.cs
- DataControlCommands.cs
- UIElementPropertyUndoUnit.cs
- DataKeyCollection.cs
- OutputCacheSettingsSection.cs
- SapiRecoInterop.cs
- ConfigXmlComment.cs
- NumericUpDown.cs
- TabPage.cs
- ReadOnlyMetadataCollection.cs
- hresults.cs
- WebPartConnectionsEventArgs.cs
- ConditionalAttribute.cs
- InsufficientMemoryException.cs
- KeyConverter.cs
- SHA512.cs
- WindowsStreamSecurityElement.cs
- X509CertificateCollection.cs
- SortDescriptionCollection.cs
- FunctionMappingTranslator.cs
- MimeTypeMapper.cs
- PrintPreviewControl.cs
- DelegateCompletionCallbackWrapper.cs