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
- VerificationAttribute.cs
- Window.cs
- VisualTreeUtils.cs
- TextEditorParagraphs.cs
- BuildManagerHost.cs
- VisualTarget.cs
- VisualStateChangedEventArgs.cs
- ParentUndoUnit.cs
- TextEditorCharacters.cs
- Fault.cs
- XmlDataSourceView.cs
- BufferedOutputStream.cs
- SiteMapDataSource.cs
- EntitySqlQueryCacheEntry.cs
- HtmlShimManager.cs
- ClientScriptManagerWrapper.cs
- XslNumber.cs
- ParentQuery.cs
- SystemUnicastIPAddressInformation.cs
- UiaCoreApi.cs
- TreeView.cs
- XmlObjectSerializerWriteContextComplex.cs
- SendReply.cs
- RemotingException.cs
- DataPointer.cs
- CookielessHelper.cs
- DeviceContexts.cs
- ServiceElementCollection.cs
- MatrixConverter.cs
- LoadedOrUnloadedOperation.cs
- PropertyValueChangedEvent.cs
- GraphicsContext.cs
- ClassDataContract.cs
- DataGridViewCellLinkedList.cs
- ApplicationServiceHelper.cs
- RenderingBiasValidation.cs
- BitmapEffect.cs
- ValueConversionAttribute.cs
- CustomAttributeBuilder.cs
- DataService.cs
- CounterSetInstanceCounterDataSet.cs
- WrappedDispatcherException.cs
- SignedPkcs7.cs
- ListSourceHelper.cs
- Dispatcher.cs
- ISAPIWorkerRequest.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- PagerSettings.cs
- tabpagecollectioneditor.cs
- AccessDataSource.cs
- ButtonFlatAdapter.cs
- FormatSettings.cs
- ConfigurationStrings.cs
- DeviceContexts.cs
- SqlFunctionAttribute.cs
- UnsafeNativeMethods.cs
- HttpHandlerActionCollection.cs
- UpdatableWrapper.cs
- SamlConstants.cs
- RSAOAEPKeyExchangeDeformatter.cs
- CrossContextChannel.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SecurityAlgorithmSuiteConverter.cs
- ApplicationBuildProvider.cs
- LeafCellTreeNode.cs
- NameValueCollection.cs
- X509CertificateValidator.cs
- TextServicesCompartmentEventSink.cs
- TemplatedMailWebEventProvider.cs
- NullableBoolConverter.cs
- InputBuffer.cs
- Exception.cs
- SocketAddress.cs
- ProfessionalColorTable.cs
- Parsers.cs
- PluralizationServiceUtil.cs
- ProjectionAnalyzer.cs
- Point.cs
- WeakEventManager.cs
- RandomNumberGenerator.cs
- PropertyEntry.cs
- SQlBooleanStorage.cs
- MDIWindowDialog.cs
- IndexedGlyphRun.cs
- HostedNamedPipeTransportManager.cs
- CodeLabeledStatement.cs
- WorkflowMarkupSerializer.cs
- DataGridViewCellCollection.cs
- WebPartPersonalization.cs
- TraceXPathNavigator.cs
- PolicyLevel.cs
- JavaScriptObjectDeserializer.cs
- CodeArrayIndexerExpression.cs
- ProtocolsConfigurationEntry.cs
- CodeTypeReferenceExpression.cs
- SettingsPropertyNotFoundException.cs
- AppDomainInfo.cs
- DropTarget.cs
- TrackingRecord.cs
- ListBindingConverter.cs