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
- Lease.cs
- DiagnosticEventProvider.cs
- ExtendedProperty.cs
- XmlDataSourceDesigner.cs
- ImageMap.cs
- XmlAutoDetectWriter.cs
- VideoDrawing.cs
- AlternateView.cs
- PolicyStatement.cs
- CodeGenerator.cs
- Control.cs
- Control.cs
- TableParagraph.cs
- SingleBodyParameterMessageFormatter.cs
- PrivilegedConfigurationManager.cs
- Query.cs
- WorkflowQueueInfo.cs
- DataGridColumnCollection.cs
- UpDownBaseDesigner.cs
- HttpModuleAction.cs
- IdentityHolder.cs
- XslCompiledTransform.cs
- CommentEmitter.cs
- SchemaCollectionPreprocessor.cs
- CellQuery.cs
- PropertyGridEditorPart.cs
- InvokeMemberBinder.cs
- ItemCheckEvent.cs
- Preprocessor.cs
- ImageIndexConverter.cs
- DataGridViewHitTestInfo.cs
- WindowsListViewScroll.cs
- PropertyChangeTracker.cs
- DiscreteKeyFrames.cs
- WebConfigurationHost.cs
- BitmapMetadata.cs
- ImportOptions.cs
- SafeTokenHandle.cs
- Win32Native.cs
- ToolStripLocationCancelEventArgs.cs
- GenericRootAutomationPeer.cs
- DataGridTextColumn.cs
- LateBoundChannelParameterCollection.cs
- ProvidePropertyAttribute.cs
- DoubleAverageAggregationOperator.cs
- TextElementEnumerator.cs
- SqlBulkCopyColumnMapping.cs
- UnsafeNativeMethods.cs
- WindowsSpinner.cs
- TypeViewSchema.cs
- ResourceKey.cs
- VectorCollectionConverter.cs
- WebService.cs
- DataListCommandEventArgs.cs
- DocumentSchemaValidator.cs
- AdapterDictionary.cs
- StackBuilderSink.cs
- AutoResizedEvent.cs
- GeneralTransform3D.cs
- Range.cs
- SafeViewOfFileHandle.cs
- RemotingServices.cs
- BindMarkupExtensionSerializer.cs
- ObjectMaterializedEventArgs.cs
- CodeStatementCollection.cs
- EntityClassGenerator.cs
- ImageConverter.cs
- RawStylusActions.cs
- BinHexDecoder.cs
- HtmlElementErrorEventArgs.cs
- SqlReferenceCollection.cs
- ActivityExecutorDelegateInfo.cs
- XmlTextWriter.cs
- Vector3DAnimationUsingKeyFrames.cs
- RotateTransform.cs
- AccessedThroughPropertyAttribute.cs
- BindToObject.cs
- ByteFacetDescriptionElement.cs
- UncommonField.cs
- UserControlParser.cs
- WindowsClaimSet.cs
- FileDialog.cs
- MobileCapabilities.cs
- CodeCompileUnit.cs
- FrameAutomationPeer.cs
- TreeNodeConverter.cs
- HttpHandlersSection.cs
- CodeAssignStatement.cs
- SignatureHelper.cs
- LabelLiteral.cs
- ContextMenuStripActionList.cs
- MethodAccessException.cs
- ViewgenContext.cs
- Message.cs
- Misc.cs
- RecordManager.cs
- XPathPatternParser.cs
- FloaterParaClient.cs
- WebPartChrome.cs
- BamlCollectionHolder.cs