Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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(); } } }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
- CompilationRelaxations.cs
- Evaluator.cs
- DoubleAnimationBase.cs
- Stack.cs
- ServiceMemoryGates.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SetStateDesigner.cs
- XmlAttributeCollection.cs
- XmlTextWriter.cs
- XmlBaseWriter.cs
- ProofTokenCryptoHandle.cs
- SqlServer2KCompatibilityAnnotation.cs
- InputLanguage.cs
- SchemaAttDef.cs
- dbdatarecord.cs
- SignHashRequest.cs
- ConfigurationPropertyCollection.cs
- GraphicsState.cs
- RequestCacheValidator.cs
- DetailsViewDeleteEventArgs.cs
- ConnectionManagementElementCollection.cs
- X509CertificateCollection.cs
- CompositeFontInfo.cs
- DbConnectionPoolOptions.cs
- WebPartEditorOkVerb.cs
- InternalMappingException.cs
- EditCommandColumn.cs
- Container.cs
- DefaultHttpHandler.cs
- SecurityPolicySection.cs
- TransactionProxy.cs
- ViewPort3D.cs
- ObjectDataSourceEventArgs.cs
- SessionStateUtil.cs
- DbConnectionHelper.cs
- RegexGroup.cs
- Matrix.cs
- DbMetaDataCollectionNames.cs
- DataViewManagerListItemTypeDescriptor.cs
- ResourceReader.cs
- HeaderUtility.cs
- TdsValueSetter.cs
- StandardBindingReliableSessionElement.cs
- TraceInternal.cs
- ContextDataSourceView.cs
- WmfPlaceableFileHeader.cs
- CharStorage.cs
- SecureStringHasher.cs
- ContentElementCollection.cs
- ToggleButton.cs
- FormsAuthenticationModule.cs
- RawStylusInputReport.cs
- MarkupObject.cs
- ZipIOBlockManager.cs
- SizeKeyFrameCollection.cs
- InvokeProviderWrapper.cs
- DivideByZeroException.cs
- ObjectContextServiceProvider.cs
- TcpWorkerProcess.cs
- EventPrivateKey.cs
- FileBasedResourceGroveler.cs
- FacetValueContainer.cs
- TimeSpan.cs
- UITypeEditor.cs
- CompensationExtension.cs
- WebPartConnectionsConnectVerb.cs
- UInt16.cs
- XhtmlBasicValidationSummaryAdapter.cs
- WS2007HttpBindingCollectionElement.cs
- AttachedAnnotationChangedEventArgs.cs
- QuotedStringFormatReader.cs
- StylusPointPropertyId.cs
- AVElementHelper.cs
- WebBrowserEvent.cs
- ExpandedProjectionNode.cs
- AttributeEmitter.cs
- ExtentKey.cs
- SecurityDocument.cs
- RelationshipType.cs
- SafeEventHandle.cs
- _SSPIWrapper.cs
- DefaultCommandConverter.cs
- DeviceContexts.cs
- CodeLabeledStatement.cs
- DataGridViewRowCollection.cs
- MediaElement.cs
- SQLMoneyStorage.cs
- TextServicesLoader.cs
- HtmlTable.cs
- Underline.cs
- CodeSubDirectoriesCollection.cs
- ExpandCollapsePattern.cs
- CalendarData.cs
- DbgCompiler.cs
- JsonCollectionDataContract.cs
- RolePrincipal.cs
- OracleConnectionStringBuilder.cs
- ModulesEntry.cs
- XamlPoint3DCollectionSerializer.cs
- UrlPropertyAttribute.cs