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
- DataGridViewRowConverter.cs
- SecurityCookieModeValidator.cs
- RuntimeEnvironment.cs
- SrgsElementFactory.cs
- xml.cs
- FixedSOMPageConstructor.cs
- _HTTPDateParse.cs
- ServiceOperationWrapper.cs
- EntitySetDataBindingList.cs
- DelegateArgumentValue.cs
- CodeEntryPointMethod.cs
- LateBoundBitmapDecoder.cs
- DodSequenceMerge.cs
- FloaterParaClient.cs
- ConfigXmlElement.cs
- RightsManagementErrorHandler.cs
- OdbcException.cs
- ScriptManager.cs
- InputBuffer.cs
- documentsequencetextcontainer.cs
- ListView.cs
- _BaseOverlappedAsyncResult.cs
- DesignerPerfEventProvider.cs
- Handle.cs
- XmlMemberMapping.cs
- MsmqIntegrationOutputChannel.cs
- CodeDOMProvider.cs
- NativeMethods.cs
- BitmapEffect.cs
- WSHttpBindingBaseElement.cs
- ReliableSessionBindingElementImporter.cs
- ProviderConnectionPoint.cs
- SqlCacheDependency.cs
- DBNull.cs
- UnsafeNativeMethods.cs
- PointAnimation.cs
- ScrollPattern.cs
- SplashScreenNativeMethods.cs
- TransactionBridgeSection.cs
- MetaModel.cs
- XPathNavigator.cs
- wmiutil.cs
- FileUpload.cs
- SoapAttributes.cs
- MetabaseServerConfig.cs
- XamlBrushSerializer.cs
- CodeAttributeDeclaration.cs
- LocatorManager.cs
- SettingsSection.cs
- _emptywebproxy.cs
- ParentUndoUnit.cs
- DataGridViewCellStyleChangedEventArgs.cs
- CheckBoxBaseAdapter.cs
- BindingsCollection.cs
- CommonEndpointBehaviorElement.cs
- EdmMember.cs
- FormClosingEvent.cs
- PtsCache.cs
- OptimizedTemplateContent.cs
- CreateParams.cs
- indexingfiltermarshaler.cs
- BindStream.cs
- NullableBoolConverter.cs
- dbenumerator.cs
- documentsequencetextpointer.cs
- PersonalizableTypeEntry.cs
- TableParaClient.cs
- Propagator.ExtentPlaceholderCreator.cs
- OneOfElement.cs
- SettingsBindableAttribute.cs
- TemplateControlParser.cs
- AllMembershipCondition.cs
- CharAnimationBase.cs
- TextServicesLoader.cs
- UndirectedGraph.cs
- Partitioner.cs
- PrePrepareMethodAttribute.cs
- InvalidTimeZoneException.cs
- AnimatedTypeHelpers.cs
- EntityDataSourceQueryBuilder.cs
- BuildResult.cs
- MediaSystem.cs
- PropertyEntry.cs
- TrackingStringDictionary.cs
- Image.cs
- DataPagerFieldCommandEventArgs.cs
- DataSourceViewSchemaConverter.cs
- Collection.cs
- BreakRecordTable.cs
- CharEntityEncoderFallback.cs
- TreeBuilderXamlTranslator.cs
- GeometryCombineModeValidation.cs
- CodeCastExpression.cs
- ArgumentException.cs
- DeferredRunTextReference.cs
- DataChangedEventManager.cs
- Comparer.cs
- XmlSchemaAnnotation.cs
- DataGridColumnCollectionEditor.cs
- ShimAsPublicXamlType.cs