Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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(); } } } // 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
- ConfigurationManagerHelper.cs
- DynamicPhysicalDiscoSearcher.cs
- SpinWait.cs
- DataRowComparer.cs
- DateTimePicker.cs
- DoubleSumAggregationOperator.cs
- RadioButtonList.cs
- XmlSchemaSimpleTypeUnion.cs
- BaseComponentEditor.cs
- XPathException.cs
- DataGridViewTopRowAccessibleObject.cs
- SqlProvider.cs
- DataSourceSerializationException.cs
- HtmlTextArea.cs
- HGlobalSafeHandle.cs
- HistoryEventArgs.cs
- SoapDocumentMethodAttribute.cs
- DataRow.cs
- Visual.cs
- DropTarget.cs
- TypeExtension.cs
- ManagedCodeMarkers.cs
- InvalidWMPVersionException.cs
- DataContext.cs
- TreeNodeStyle.cs
- RegularExpressionValidator.cs
- InvalidAsynchronousStateException.cs
- XPathNodeHelper.cs
- SelectionProcessor.cs
- CalendarDesigner.cs
- ValidationSummary.cs
- InstanceOwnerException.cs
- ExpressionConverter.cs
- CheckPair.cs
- DateTimeOffsetStorage.cs
- XPathException.cs
- M3DUtil.cs
- OperationCanceledException.cs
- ValidationRule.cs
- SpecialNameAttribute.cs
- DataGridViewLinkColumn.cs
- GlyphingCache.cs
- SmtpLoginAuthenticationModule.cs
- _NetRes.cs
- ReservationCollection.cs
- MouseGestureValueSerializer.cs
- X509Certificate.cs
- SecurityTraceRecordHelper.cs
- X509SubjectKeyIdentifierClause.cs
- TransactionState.cs
- Int32Collection.cs
- WebPartDeleteVerb.cs
- LayoutTableCell.cs
- MetadataException.cs
- StringSorter.cs
- CachedBitmap.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- RequestCachePolicy.cs
- StringUtil.cs
- ScriptingJsonSerializationSection.cs
- RpcCryptoContext.cs
- OpCopier.cs
- XmlComment.cs
- _SafeNetHandles.cs
- HtmlDocument.cs
- DCSafeHandle.cs
- SqlMethods.cs
- MenuItemStyleCollection.cs
- MetafileHeaderEmf.cs
- ValidationHelper.cs
- MediaContextNotificationWindow.cs
- COM2Properties.cs
- PropertyChangedEventManager.cs
- CrossContextChannel.cs
- DescriptionCreator.cs
- MouseDevice.cs
- FixedTextSelectionProcessor.cs
- ContractTypeNameElement.cs
- mactripleDES.cs
- PageFunction.cs
- FontStretchConverter.cs
- TerminateDesigner.cs
- QueryParameter.cs
- DocumentAutomationPeer.cs
- QualifiedCellIdBoolean.cs
- WebPartDisplayMode.cs
- basenumberconverter.cs
- NamespaceCollection.cs
- ParameterElementCollection.cs
- RequestCacheValidator.cs
- LinkButton.cs
- InvalidCommandTreeException.cs
- HttpContext.cs
- PanningMessageFilter.cs
- DefaultWorkflowSchedulerService.cs
- OleDbDataReader.cs
- DeclarativeCatalogPart.cs
- AssemblyCollection.cs
- AuthenticateEventArgs.cs
- AuthenticationModuleElement.cs