Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SapiInterop.cs
- VisualProxy.cs
- GridItemPattern.cs
- CompareValidator.cs
- CodeTryCatchFinallyStatement.cs
- BitmapDownload.cs
- XXXInfos.cs
- PingReply.cs
- StoreAnnotationsMap.cs
- GlyphInfoList.cs
- CodeConditionStatement.cs
- Compilation.cs
- NetworkInformationException.cs
- GeometryCombineModeValidation.cs
- CalendarButtonAutomationPeer.cs
- Timer.cs
- PrtCap_Builder.cs
- TraceListeners.cs
- RsaSecurityKey.cs
- ComponentEditorForm.cs
- ToolStripItemTextRenderEventArgs.cs
- ScrollItemPattern.cs
- ComponentResourceManager.cs
- XPathDocument.cs
- ProgressBarHighlightConverter.cs
- HtmlTableCellCollection.cs
- HostProtectionException.cs
- ListBoxItemWrapperAutomationPeer.cs
- RuntimeConfig.cs
- XmlDataSourceView.cs
- Debug.cs
- DBSqlParser.cs
- BypassElementCollection.cs
- TraceFilter.cs
- UnknownBitmapEncoder.cs
- ColorAnimationUsingKeyFrames.cs
- Site.cs
- MessageQueuePermissionEntryCollection.cs
- WebCategoryAttribute.cs
- XmlSerializer.cs
- MethodToken.cs
- PowerStatus.cs
- Vector3DConverter.cs
- DependencyObjectProvider.cs
- CharAnimationBase.cs
- PassportIdentity.cs
- Trace.cs
- Oid.cs
- EntityClassGenerator.cs
- DesignerActionHeaderItem.cs
- XmlSerializerFactory.cs
- EndpointAddressProcessor.cs
- _LoggingObject.cs
- Int32RectConverter.cs
- XmlILOptimizerVisitor.cs
- CalendarButton.cs
- FilteredReadOnlyMetadataCollection.cs
- ResourceCategoryAttribute.cs
- UIElementAutomationPeer.cs
- OleDbEnumerator.cs
- _SecureChannel.cs
- TypeRefElement.cs
- BuildDependencySet.cs
- NameSpaceEvent.cs
- SpellerHighlightLayer.cs
- IISUnsafeMethods.cs
- RestHandlerFactory.cs
- SettingsAttributes.cs
- FormViewModeEventArgs.cs
- ReliableChannelFactory.cs
- InvalidPipelineStoreException.cs
- PlatformCulture.cs
- RuntimeConfigLKG.cs
- FixedDocumentPaginator.cs
- TableLayoutRowStyleCollection.cs
- VectorAnimationBase.cs
- WinEventTracker.cs
- RemotingSurrogateSelector.cs
- TraceListener.cs
- SerializationInfo.cs
- MostlySingletonList.cs
- LineUtil.cs
- ToolStripPanelRenderEventArgs.cs
- PageAsyncTaskManager.cs
- ExpressionEditorAttribute.cs
- ScrollChrome.cs
- NativeObjectSecurity.cs
- validationstate.cs
- DataGridViewRowsAddedEventArgs.cs
- RequestCacheEntry.cs
- BinaryWriter.cs
- ActiveDocumentEvent.cs
- UseLicense.cs
- PackageFilter.cs
- controlskin.cs
- LocalizeDesigner.cs
- FilteredAttributeCollection.cs
- ThreadInterruptedException.cs
- HttpDebugHandler.cs
- DesignerTextWriter.cs