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
- ScalarConstant.cs
- CodeNamespaceImport.cs
- Schema.cs
- DataGridViewSortCompareEventArgs.cs
- IntegerValidator.cs
- UIElementIsland.cs
- ConfigXmlReader.cs
- EdmPropertyAttribute.cs
- WebServiceClientProxyGenerator.cs
- CustomErrorsSection.cs
- ScopelessEnumAttribute.cs
- AutoResetEvent.cs
- RequestTimeoutManager.cs
- PropertyGridEditorPart.cs
- GreaterThan.cs
- PageParser.cs
- EndOfStreamException.cs
- MediaScriptCommandRoutedEventArgs.cs
- ComNativeDescriptor.cs
- UDPClient.cs
- IntSecurity.cs
- ConfigsHelper.cs
- ScriptReferenceEventArgs.cs
- TemplateBuilder.cs
- KeyEventArgs.cs
- Configuration.cs
- SQLByteStorage.cs
- ContainerVisual.cs
- SafeNativeMethods.cs
- RelOps.cs
- Utils.cs
- Constants.cs
- SortDescription.cs
- TileBrush.cs
- InternalDuplexBindingElement.cs
- DrawingContext.cs
- OleDbSchemaGuid.cs
- GridViewCommandEventArgs.cs
- HoistedLocals.cs
- BasicHttpBindingElement.cs
- DependencyObject.cs
- StreamUpdate.cs
- SecUtil.cs
- InvalidDataContractException.cs
- XmlSerializationReader.cs
- DbConnectionPoolGroup.cs
- TextElement.cs
- EventMappingSettings.cs
- ReflectionTypeLoadException.cs
- CodeVariableReferenceExpression.cs
- EncryptedKey.cs
- WindowsListView.cs
- GPPOINT.cs
- PassportPrincipal.cs
- StringOutput.cs
- ZipIOExtraFieldElement.cs
- MarkedHighlightComponent.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- MultipartIdentifier.cs
- Comparer.cs
- InvokeWebService.cs
- XmlRawWriter.cs
- CryptoKeySecurity.cs
- WebPartsPersonalization.cs
- SqlRewriteScalarSubqueries.cs
- WindowsListViewItemCheckBox.cs
- Object.cs
- EventLogException.cs
- MasterPageBuildProvider.cs
- VirtualizingPanel.cs
- ModelItemDictionary.cs
- MethodBuilder.cs
- HandleCollector.cs
- TraceInternal.cs
- Normalization.cs
- TableRowCollection.cs
- TrackPointCollection.cs
- ExpressionEvaluator.cs
- PropertyEmitter.cs
- GenericPrincipal.cs
- PrivacyNoticeBindingElement.cs
- ListViewDeletedEventArgs.cs
- CapiSymmetricAlgorithm.cs
- PerformanceCountersElement.cs
- CodeParameterDeclarationExpressionCollection.cs
- Condition.cs
- WebServiceData.cs
- XmlRawWriter.cs
- InvalidAsynchronousStateException.cs
- SectionVisual.cs
- PenContext.cs
- PaperSource.cs
- HtmlLink.cs
- Context.cs
- TableLayoutPanelDesigner.cs
- IntranetCredentialPolicy.cs
- ItemAutomationPeer.cs
- SvcMapFileLoader.cs
- Transaction.cs
- ToolStripDesignerUtils.cs