Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //ProvidePropertyAttribute overrides this to include the type name and the property name ///// 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
- DnsEndPoint.cs
- ComplexPropertyEntry.cs
- ContentWrapperAttribute.cs
- IntSecurity.cs
- DrawingVisualDrawingContext.cs
- DoubleIndependentAnimationStorage.cs
- TypeConstant.cs
- KeyTimeConverter.cs
- ThicknessAnimation.cs
- AvTraceDetails.cs
- HttpFormatExtensions.cs
- RegexGroupCollection.cs
- PropertyKey.cs
- SiteMapNodeItemEventArgs.cs
- ControlAdapter.cs
- XmlSchemaAttributeGroup.cs
- TextDecorationCollection.cs
- RemoveStoryboard.cs
- ClientSponsor.cs
- UserMapPath.cs
- DirectoryInfo.cs
- CompilationUnit.cs
- SizeValueSerializer.cs
- FormsAuthentication.cs
- DeferredElementTreeState.cs
- SqlConnectionPoolProviderInfo.cs
- UInt16Converter.cs
- BuilderElements.cs
- SchemaType.cs
- Tablet.cs
- HwndHostAutomationPeer.cs
- BinaryFormatterWriter.cs
- BoolExpr.cs
- CngKey.cs
- AnnotationDocumentPaginator.cs
- SqlCommandSet.cs
- TableColumn.cs
- TextRangeBase.cs
- EmissiveMaterial.cs
- DataContractAttribute.cs
- XmlBinaryWriterSession.cs
- WebPartDisplayModeCancelEventArgs.cs
- DeleteStoreRequest.cs
- Mouse.cs
- CompilerCollection.cs
- ButtonStandardAdapter.cs
- DataGridAddNewRow.cs
- ToolBarOverflowPanel.cs
- ConfigXmlWhitespace.cs
- Crc32Helper.cs
- SpecialTypeDataContract.cs
- SQLBytes.cs
- SSmlParser.cs
- WebPartConnectionsCancelVerb.cs
- XmlLoader.cs
- DecoderReplacementFallback.cs
- streamingZipPartStream.cs
- ListenerConnectionDemuxer.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ObjectHelper.cs
- TypeCollectionDesigner.xaml.cs
- DataTableNewRowEvent.cs
- SemaphoreFullException.cs
- QueryStatement.cs
- UnionCqlBlock.cs
- Effect.cs
- DataListItemCollection.cs
- ExpandCollapsePattern.cs
- HostedElements.cs
- MexTcpBindingCollectionElement.cs
- DataGridViewCellValidatingEventArgs.cs
- ModelUtilities.cs
- OdbcInfoMessageEvent.cs
- InputBinding.cs
- BaseInfoTable.cs
- ParentUndoUnit.cs
- WebPartVerbCollection.cs
- SourceFileBuildProvider.cs
- ErrorEventArgs.cs
- NavigationWindowAutomationPeer.cs
- XmlSchemaProviderAttribute.cs
- UInt32Storage.cs
- RegexCompilationInfo.cs
- TableLayoutPanel.cs
- RightsManagementEncryptionTransform.cs
- DoubleCollectionConverter.cs
- UIEndRequest.cs
- ZipIORawDataFileBlock.cs
- SecUtil.cs
- DrawingImage.cs
- DescendantQuery.cs
- ListViewTableCell.cs
- AuthenticationModulesSection.cs
- SingleKeyFrameCollection.cs
- LogExtentCollection.cs
- ParsedAttributeCollection.cs
- BitmapEffectGeneralTransform.cs
- QilList.cs
- AudioLevelUpdatedEventArgs.cs
- AuthenticationManager.cs