Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ToolBarTray.cs
- DesignerSerializationVisibilityAttribute.cs
- TypeConverterHelper.cs
- FlowLayout.cs
- MetadataCollection.cs
- Sentence.cs
- PrintDocument.cs
- CapabilitiesUse.cs
- SafeViewOfFileHandle.cs
- DataGridViewColumnStateChangedEventArgs.cs
- Util.cs
- LocatorPart.cs
- PageRanges.cs
- wmiprovider.cs
- PriorityRange.cs
- WebPartExportVerb.cs
- datacache.cs
- Validator.cs
- Int64.cs
- BrowserCapabilitiesCodeGenerator.cs
- PtsHost.cs
- GraphicsPathIterator.cs
- BrowserCapabilitiesFactory.cs
- FrameworkElement.cs
- WindowShowOrOpenTracker.cs
- ConstraintConverter.cs
- CollaborationHelperFunctions.cs
- DataBindingsDialog.cs
- SEHException.cs
- RawStylusInputReport.cs
- SpecialNameAttribute.cs
- ClassicBorderDecorator.cs
- RealProxy.cs
- StylusPointPropertyInfoDefaults.cs
- DownloadProgressEventArgs.cs
- ServiceMetadataExtension.cs
- WebPartEditVerb.cs
- DataPager.cs
- CompositeDataBoundControl.cs
- SqlGatherConsumedAliases.cs
- RegexCompiler.cs
- RawContentTypeMapper.cs
- ClockGroup.cs
- TraceHwndHost.cs
- mda.cs
- RuntimeHandles.cs
- DesignerSerializationVisibilityAttribute.cs
- ASCIIEncoding.cs
- Int32CollectionValueSerializer.cs
- CodeAttributeDeclaration.cs
- PriorityBindingExpression.cs
- NameValuePair.cs
- DataGridViewButtonColumn.cs
- RemotingConfiguration.cs
- StorageEntityContainerMapping.cs
- Bits.cs
- LongValidator.cs
- UserPreferenceChangingEventArgs.cs
- ConsumerConnectionPointCollection.cs
- Code.cs
- HtmlInputButton.cs
- WebPartHelpVerb.cs
- HttpContextWrapper.cs
- FeatureManager.cs
- TransformerInfoCollection.cs
- NTAccount.cs
- ItemsPanelTemplate.cs
- WpfKnownTypeInvoker.cs
- ByteStreamGeometryContext.cs
- SrgsNameValueTag.cs
- WindowsAuthenticationEventArgs.cs
- BaseDataBoundControl.cs
- MetadataAssemblyHelper.cs
- UnsafeNativeMethodsTablet.cs
- StrokeCollection2.cs
- ContainerParaClient.cs
- ConsoleEntryPoint.cs
- Misc.cs
- IisTraceWebEventProvider.cs
- RadioButtonList.cs
- HtmlTableRow.cs
- TableColumn.cs
- RIPEMD160.cs
- HyperlinkAutomationPeer.cs
- RuleInfoComparer.cs
- DataFormat.cs
- CompilerError.cs
- Sentence.cs
- FileUtil.cs
- XmlParser.cs
- PointF.cs
- IPEndPoint.cs
- CodeRemoveEventStatement.cs
- GPPOINT.cs
- MgmtConfigurationRecord.cs
- odbcmetadatafactory.cs
- ProfileProvider.cs
- ToolStripOverflowButton.cs
- UrlPropertyAttribute.cs
- AspCompat.cs