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
- XmlStreamStore.cs
- Command.cs
- SQLDateTimeStorage.cs
- BindingContext.cs
- SystemNetworkInterface.cs
- CheckPair.cs
- Bits.cs
- GregorianCalendar.cs
- MetadataArtifactLoader.cs
- ExpandCollapseProviderWrapper.cs
- CategoryNameCollection.cs
- RevocationPoint.cs
- LineSegment.cs
- PathData.cs
- UnhandledExceptionEventArgs.cs
- InteropAutomationProvider.cs
- Block.cs
- Content.cs
- WizardPanelChangingEventArgs.cs
- WebConfigurationManager.cs
- QuerySettings.cs
- WmpBitmapEncoder.cs
- CodeExporter.cs
- MessageSmuggler.cs
- ConnectionStringsExpressionBuilder.cs
- ValuePatternIdentifiers.cs
- KoreanLunisolarCalendar.cs
- _Semaphore.cs
- DbProviderSpecificTypePropertyAttribute.cs
- PageTheme.cs
- TextEditorTables.cs
- EllipseGeometry.cs
- HtmlForm.cs
- TypeResolvingOptionsAttribute.cs
- ScrollItemProviderWrapper.cs
- TextSearch.cs
- EnterpriseServicesHelper.cs
- ListBoxItemAutomationPeer.cs
- OleDbException.cs
- HtmlTitle.cs
- CheckedListBox.cs
- Application.cs
- FunctionDetailsReader.cs
- EncoderParameter.cs
- RegexStringValidatorAttribute.cs
- DependencyPropertyChangedEventArgs.cs
- ProfessionalColors.cs
- TargetControlTypeAttribute.cs
- WebPartDisplayModeCancelEventArgs.cs
- XmlSortKeyAccumulator.cs
- RectAnimationClockResource.cs
- SparseMemoryStream.cs
- DataListCommandEventArgs.cs
- HtmlTableCell.cs
- TypeDescriptorFilterService.cs
- Attributes.cs
- WorkerRequest.cs
- DnsPermission.cs
- DesignerActionKeyboardBehavior.cs
- AnnotationObservableCollection.cs
- IntellisenseTextBox.cs
- ComPlusServiceLoader.cs
- CompilerState.cs
- DrawingContextWalker.cs
- EventLog.cs
- CheckBoxStandardAdapter.cs
- StylusPointProperties.cs
- DynamicQueryStringParameter.cs
- ChameleonKey.cs
- CqlBlock.cs
- EpmTargetTree.cs
- TagNameToTypeMapper.cs
- SurrogateEncoder.cs
- dbdatarecord.cs
- ExtenderControl.cs
- SQLSingle.cs
- BigInt.cs
- SecurityPolicySection.cs
- MouseEvent.cs
- WindowsImpersonationContext.cs
- SqlFacetAttribute.cs
- selecteditemcollection.cs
- SafeNativeMethods.cs
- SqlConnectionFactory.cs
- AttributeQuery.cs
- CasesDictionary.cs
- MouseActionValueSerializer.cs
- RowToFieldTransformer.cs
- SecureStringHasher.cs
- WebPartEditorCancelVerb.cs
- WsatTransactionFormatter.cs
- FormattedTextSymbols.cs
- CodeVariableReferenceExpression.cs
- ComponentChangingEvent.cs
- SchemaImporterExtensionElement.cs
- DataSourceXmlClassAttribute.cs
- DataObjectEventArgs.cs
- GridViewEditEventArgs.cs
- Property.cs
- AmbientLight.cs