Code:
/ FX-1434 / FX-1434 / 1.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
- ProbeMatches11.cs
- OpenTypeCommon.cs
- FixedSOMGroup.cs
- altserialization.cs
- ImageList.cs
- SiteMapNodeItem.cs
- RepeaterItemCollection.cs
- WpfKnownMember.cs
- MergeFailedEvent.cs
- SmtpTransport.cs
- _FtpDataStream.cs
- ADMembershipProvider.cs
- DependencyPropertyChangedEventArgs.cs
- GraphicsState.cs
- AtomParser.cs
- BCLDebug.cs
- DbConnectionPoolGroup.cs
- ChildTable.cs
- ApplicationException.cs
- FormViewInsertEventArgs.cs
- SchemaDeclBase.cs
- DesignerOptionService.cs
- DoubleAnimationUsingKeyFrames.cs
- DataGridViewCellStyleConverter.cs
- DrawingCollection.cs
- Transform3D.cs
- ProgressBarRenderer.cs
- Claim.cs
- Point3DCollectionConverter.cs
- HttpRawResponse.cs
- WaitForChangedResult.cs
- DataViewSetting.cs
- LinqDataSourceEditData.cs
- MenuItemBindingCollection.cs
- PerfCounters.cs
- FileUpload.cs
- ListBox.cs
- SiteMapHierarchicalDataSourceView.cs
- UnknownBitmapEncoder.cs
- Group.cs
- DomainLiteralReader.cs
- ListenerConfig.cs
- DataFieldConverter.cs
- SchemaImporterExtensionsSection.cs
- DocComment.cs
- DataSourceXmlClassAttribute.cs
- NetworkAddressChange.cs
- CriticalExceptions.cs
- WebException.cs
- QilStrConcat.cs
- ListBox.cs
- InitializerFacet.cs
- LogRestartAreaEnumerator.cs
- ConnectionsZone.cs
- ProfileGroupSettings.cs
- TemplateControlBuildProvider.cs
- XmlHierarchicalEnumerable.cs
- ReflectEventDescriptor.cs
- TransformProviderWrapper.cs
- HandledMouseEvent.cs
- ClipboardProcessor.cs
- DataGridViewColumnStateChangedEventArgs.cs
- TracingConnection.cs
- BuilderElements.cs
- CodeRemoveEventStatement.cs
- DataKey.cs
- NativeWindow.cs
- ListView.cs
- SymDocumentType.cs
- WindowsSolidBrush.cs
- OpenFileDialog.cs
- TaskExtensions.cs
- PenCursorManager.cs
- PersonalizationProvider.cs
- KeyGestureValueSerializer.cs
- Icon.cs
- HttpAsyncResult.cs
- Int64AnimationUsingKeyFrames.cs
- SqlDataSourceStatusEventArgs.cs
- SpeechEvent.cs
- ProcessStartInfo.cs
- Utils.cs
- ResourcePermissionBaseEntry.cs
- serverconfig.cs
- PersonalizationProvider.cs
- LoginCancelEventArgs.cs
- JsonCollectionDataContract.cs
- SchemaMapping.cs
- DefaultTextStoreTextComposition.cs
- CryptoHandle.cs
- RadioButton.cs
- WaitHandleCannotBeOpenedException.cs
- VectorCollectionConverter.cs
- DataContext.cs
- GrammarBuilderDictation.cs
- ExtensionSimplifierMarkupObject.cs
- StreamSecurityUpgradeProvider.cs
- GifBitmapDecoder.cs
- SiteMapPath.cs
- DataColumnMapping.cs