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
- DbMetaDataCollectionNames.cs
- Vector3D.cs
- ProgressiveCrcCalculatingStream.cs
- WorkflowElementDialog.cs
- ProfileInfo.cs
- SplitterPanel.cs
- FontWeight.cs
- MoveSizeWinEventHandler.cs
- ImageCodecInfo.cs
- TextComposition.cs
- DataRecordInternal.cs
- securitymgrsite.cs
- WinEventHandler.cs
- basevalidator.cs
- ParameterBuilder.cs
- PreviewPageInfo.cs
- HtmlInputRadioButton.cs
- ThaiBuddhistCalendar.cs
- SQLInt32Storage.cs
- RectConverter.cs
- Parser.cs
- userdatakeys.cs
- Slider.cs
- AmbiguousMatchException.cs
- DragCompletedEventArgs.cs
- SvcMapFileLoader.cs
- ExportFileRequest.cs
- ToolStripOverflow.cs
- AlgoModule.cs
- SessionViewState.cs
- WeakReferenceList.cs
- Shape.cs
- DataSourceSelectArguments.cs
- BitmapEffect.cs
- DataViewListener.cs
- DataGridColumnHeaderCollection.cs
- SemanticAnalyzer.cs
- DesignerActionGlyph.cs
- XmlName.cs
- cookieexception.cs
- DoubleUtil.cs
- RoleManagerEventArgs.cs
- BreadCrumbTextConverter.cs
- DBAsyncResult.cs
- RewritingSimplifier.cs
- SpeechAudioFormatInfo.cs
- MenuAutomationPeer.cs
- WhileDesigner.cs
- EditorPartCollection.cs
- XmlDataCollection.cs
- TextEvent.cs
- MetadataCache.cs
- RegexNode.cs
- DataGridViewCellStyleBuilderDialog.cs
- AutoResetEvent.cs
- BitmapEffectInputData.cs
- IconHelper.cs
- SqlFactory.cs
- SafeHandle.cs
- TreeViewCancelEvent.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- SelectionHighlightInfo.cs
- DynamicMethod.cs
- Geometry.cs
- ProcessHost.cs
- EntitySqlQueryBuilder.cs
- StructuredProperty.cs
- CompressStream.cs
- XamlTemplateSerializer.cs
- ImageMap.cs
- QueryPageSettingsEventArgs.cs
- ScrollData.cs
- PathGradientBrush.cs
- FormViewInsertedEventArgs.cs
- SqlClientWrapperSmiStreamChars.cs
- LicFileLicenseProvider.cs
- SingletonChannelAcceptor.cs
- XhtmlBasicSelectionListAdapter.cs
- Operator.cs
- PropertyBuilder.cs
- Win32Exception.cs
- SqlInfoMessageEvent.cs
- LineInfo.cs
- SQLMembershipProvider.cs
- HtmlWindow.cs
- InternalMappingException.cs
- CodeTypeReferenceSerializer.cs
- ImagingCache.cs
- AutoCompleteStringCollection.cs
- SingleObjectCollection.cs
- ProcessModelSection.cs
- IListConverters.cs
- __ComObject.cs
- FormViewInsertedEventArgs.cs
- ContextBase.cs
- EndCreateSecurityTokenRequest.cs
- BuildResultCache.cs
- Convert.cs
- FamilyCollection.cs
- COM2DataTypeToManagedDataTypeConverter.cs