Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Convert.cs
- PropertyChange.cs
- ComplexObject.cs
- HierarchicalDataBoundControlAdapter.cs
- StateChangeEvent.cs
- SystemFonts.cs
- HttpPostedFile.cs
- ButtonRenderer.cs
- HostSecurityManager.cs
- NullRuntimeConfig.cs
- FileRecordSequenceHelper.cs
- SamlAssertionKeyIdentifierClause.cs
- ImageAutomationPeer.cs
- MasterPageBuildProvider.cs
- SqlCacheDependencySection.cs
- SkinBuilder.cs
- HtmlInputSubmit.cs
- CompilerParameters.cs
- ScalarOps.cs
- X509CertificateStore.cs
- GroupPartitionExpr.cs
- OperationCanceledException.cs
- InvokeHandlers.cs
- Catch.cs
- MultiTrigger.cs
- NoneExcludedImageIndexConverter.cs
- ObservableDictionary.cs
- ConfigurationManagerInternal.cs
- QilVisitor.cs
- DefaultMemberAttribute.cs
- TypeNameHelper.cs
- StylusCaptureWithinProperty.cs
- DomainUpDown.cs
- HitTestParameters3D.cs
- CopyAction.cs
- WindowsGraphicsCacheManager.cs
- StrokeCollectionDefaultValueFactory.cs
- ObjectCloneHelper.cs
- Timeline.cs
- RelationshipEndMember.cs
- SafeNativeMethods.cs
- MultiByteCodec.cs
- TextTreeExtractElementUndoUnit.cs
- HttpFileCollection.cs
- ConfigurationManagerInternal.cs
- EntitySetDataBindingList.cs
- DataRowCollection.cs
- ValuePatternIdentifiers.cs
- ReverseQueryOperator.cs
- wgx_commands.cs
- MasterPage.cs
- Propagator.JoinPropagator.cs
- InteropAutomationProvider.cs
- FormViewCommandEventArgs.cs
- OpacityConverter.cs
- NonParentingControl.cs
- EmissiveMaterial.cs
- SettingsProviderCollection.cs
- ContentValidator.cs
- CommandHelpers.cs
- SiteMapDataSourceView.cs
- TreeBuilder.cs
- WindowProviderWrapper.cs
- EdmSchemaError.cs
- DbConnectionClosed.cs
- HealthMonitoringSectionHelper.cs
- WebPartMovingEventArgs.cs
- LookupBindingPropertiesAttribute.cs
- ToolboxCategoryItems.cs
- OdbcError.cs
- ClientScriptItemCollection.cs
- OdbcTransaction.cs
- CultureMapper.cs
- LinqDataSourceSelectEventArgs.cs
- EventLogConfiguration.cs
- TextEditorSelection.cs
- TreeNodeBinding.cs
- SignatureDescription.cs
- RelationalExpressions.cs
- SystemIPv6InterfaceProperties.cs
- CodeTypeOfExpression.cs
- PointCollectionValueSerializer.cs
- ObfuscationAttribute.cs
- TypeUtil.cs
- MetadataCacheItem.cs
- WebPartCatalogAddVerb.cs
- UnrecognizedAssertionsBindingElement.cs
- EventBookmark.cs
- Version.cs
- ClientTargetCollection.cs
- Encoding.cs
- FlowDocumentReaderAutomationPeer.cs
- SortedDictionary.cs
- CacheChildrenQuery.cs
- CryptoApi.cs
- SecurityElement.cs
- SqlFormatter.cs
- WebPart.cs
- TableRowCollection.cs
- CounterSample.cs