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
- MobileTextWriter.cs
- FixedBufferAttribute.cs
- RuleValidation.cs
- KoreanLunisolarCalendar.cs
- Win32Exception.cs
- SelectionItemPattern.cs
- UpdatePanelControlTrigger.cs
- DependencyPropertyValueSerializer.cs
- Quaternion.cs
- GPStream.cs
- CqlBlock.cs
- SoapSchemaMember.cs
- TdsParserHelperClasses.cs
- ResourceProviderFactory.cs
- GenericTextProperties.cs
- AspCompat.cs
- LinearGradientBrush.cs
- DecimalSumAggregationOperator.cs
- COM2EnumConverter.cs
- MissingMemberException.cs
- DockAndAnchorLayout.cs
- XmlBoundElement.cs
- SeekStoryboard.cs
- CodeIterationStatement.cs
- DebugViewWriter.cs
- Socket.cs
- CollectionConverter.cs
- Selection.cs
- SimpleRecyclingCache.cs
- DesignerForm.cs
- propertytag.cs
- Adorner.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- XmlReflectionMember.cs
- EntityDataSourceContainerNameConverter.cs
- Utils.cs
- DataGridPageChangedEventArgs.cs
- ControlPropertyNameConverter.cs
- WebPartConnectionsEventArgs.cs
- ResumeStoryboard.cs
- UserNameSecurityToken.cs
- OrderedDictionaryStateHelper.cs
- TemplateComponentConnector.cs
- PropertiesTab.cs
- SolidColorBrush.cs
- XmlCodeExporter.cs
- AudioFormatConverter.cs
- Assembly.cs
- MailAddressCollection.cs
- InputManager.cs
- UpdateManifestForBrowserApplication.cs
- BindingsCollection.cs
- HitTestResult.cs
- StrokeNodeOperations.cs
- OracleSqlParser.cs
- ComContractElement.cs
- SmtpLoginAuthenticationModule.cs
- NamespaceInfo.cs
- XamlReaderHelper.cs
- GlyphInfoList.cs
- TextEditorLists.cs
- WebEventTraceProvider.cs
- TextComposition.cs
- PropertySourceInfo.cs
- MessageEncodingBindingElementImporter.cs
- ItemType.cs
- FileLoadException.cs
- ScriptMethodAttribute.cs
- AuthenticationConfig.cs
- SoapHelper.cs
- PropertyOverridesTypeEditor.cs
- XPathAncestorIterator.cs
- AesCryptoServiceProvider.cs
- XmlSerializationWriter.cs
- SizeValueSerializer.cs
- Matrix.cs
- VersionedStream.cs
- FileSystemWatcher.cs
- AuthenticationConfig.cs
- SecurityTokenProvider.cs
- DataGridViewCellStyle.cs
- InternalsVisibleToAttribute.cs
- SaveFileDialog.cs
- Rect.cs
- UnmanagedMemoryStreamWrapper.cs
- ServiceInstallComponent.cs
- OneOfConst.cs
- AuthenticationService.cs
- QueryOutputWriter.cs
- OdbcStatementHandle.cs
- OleDbRowUpdatingEvent.cs
- OpCellTreeNode.cs
- IndexerNameAttribute.cs
- FontDifferentiator.cs
- HTMLTextWriter.cs
- DynamicPhysicalDiscoSearcher.cs
- SizeLimitedCache.cs
- Marshal.cs
- _Semaphore.cs
- SignedXml.cs