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
- Mappings.cs
- SchemaElement.cs
- MultipartContentParser.cs
- SqlNode.cs
- InternalsVisibleToAttribute.cs
- CommandLibraryHelper.cs
- DataPager.cs
- StorageFunctionMapping.cs
- SelectionItemProviderWrapper.cs
- MediaScriptCommandRoutedEventArgs.cs
- ScriptReference.cs
- SizeChangedEventArgs.cs
- ClientRolePrincipal.cs
- RemotingException.cs
- RegexGroup.cs
- ListViewGroupCollectionEditor.cs
- OperationSelectorBehavior.cs
- XmlNamespaceManager.cs
- WindowsAuthenticationModule.cs
- AccessibilityHelperForXpWin2k3.cs
- WebServiceClientProxyGenerator.cs
- PropertyInfoSet.cs
- QfeChecker.cs
- TiffBitmapEncoder.cs
- Tablet.cs
- SharedDp.cs
- TransformerInfo.cs
- Transactions.cs
- RowsCopiedEventArgs.cs
- Calendar.cs
- OdbcConnectionFactory.cs
- XmlAnyAttributeAttribute.cs
- Point3DIndependentAnimationStorage.cs
- DataGridViewCheckBoxCell.cs
- SettingsPropertyIsReadOnlyException.cs
- AlgoModule.cs
- CellPartitioner.cs
- DWriteFactory.cs
- SQLMoney.cs
- WpfGeneratedKnownProperties.cs
- RectangleGeometry.cs
- SslStreamSecurityElement.cs
- BuilderPropertyEntry.cs
- ObjectIDGenerator.cs
- PassportAuthentication.cs
- BitStream.cs
- NetSectionGroup.cs
- CryptoKeySecurity.cs
- XmlName.cs
- XmlReturnWriter.cs
- ObjectItemAttributeAssemblyLoader.cs
- PointConverter.cs
- OracleParameterBinding.cs
- CodeTypeParameterCollection.cs
- SqlBulkCopyColumnMappingCollection.cs
- LogicalCallContext.cs
- PageSetupDialog.cs
- BadImageFormatException.cs
- AssertFilter.cs
- DataGridHeaderBorder.cs
- ScalarOps.cs
- ThreadStartException.cs
- CompiledQuery.cs
- GridItemCollection.cs
- QuaternionAnimation.cs
- ScaleTransform3D.cs
- CompensationToken.cs
- EntityClientCacheKey.cs
- SqlUnionizer.cs
- PreviewPrintController.cs
- SBCSCodePageEncoding.cs
- Operand.cs
- SchemaCollectionPreprocessor.cs
- QilPatternVisitor.cs
- DocumentPage.cs
- TitleStyle.cs
- ToolStripComboBox.cs
- FamilyCollection.cs
- HttpProfileGroupBase.cs
- Authorization.cs
- Rotation3D.cs
- DataControlCommands.cs
- ApplicationDirectory.cs
- StrokeSerializer.cs
- ProvidePropertyAttribute.cs
- FileSystemInfo.cs
- DataTableNewRowEvent.cs
- StandardToolWindows.cs
- AnimationClockResource.cs
- ComponentCollection.cs
- MenuItemCollection.cs
- configsystem.cs
- WorkflowDesignerMessageFilter.cs
- ParsedRoute.cs
- ChildChangedEventArgs.cs
- DecimalAnimation.cs
- CTreeGenerator.cs
- CaseInsensitiveComparer.cs
- UnmanagedBitmapWrapper.cs
- ScriptingProfileServiceSection.cs