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
- AuthorizationRule.cs
- ScriptReference.cs
- FlowLayoutSettings.cs
- XmlSignatureManifest.cs
- SQLString.cs
- BindingValueChangedEventArgs.cs
- PropertyChangeTracker.cs
- FolderBrowserDialog.cs
- MetafileHeader.cs
- ResXDataNode.cs
- IdnElement.cs
- Rectangle.cs
- StylusCollection.cs
- XmlSchemaDocumentation.cs
- TreeNodeCollection.cs
- SchemaImporterExtensionElement.cs
- TabRenderer.cs
- NavigationProperty.cs
- ConfigurationException.cs
- AssemblyBuilder.cs
- DisplayNameAttribute.cs
- BindingMAnagerBase.cs
- CancellationState.cs
- RSAOAEPKeyExchangeFormatter.cs
- SqlDependency.cs
- FileSystemWatcher.cs
- AttributeQuery.cs
- FloatUtil.cs
- MergeExecutor.cs
- WS2007HttpBindingElement.cs
- PerformanceCounterPermissionEntry.cs
- ObjectTag.cs
- NotifyIcon.cs
- AnimationTimeline.cs
- WebHttpBehavior.cs
- CollectionType.cs
- HtmlUtf8RawTextWriter.cs
- CellQuery.cs
- DataColumnMapping.cs
- SocketInformation.cs
- WebPartConnectionsCancelVerb.cs
- DataGridViewLayoutData.cs
- Semaphore.cs
- TextureBrush.cs
- PropVariant.cs
- SystemColors.cs
- ScalarOps.cs
- FunctionCommandText.cs
- LogWriteRestartAreaState.cs
- AccessedThroughPropertyAttribute.cs
- WebPartManager.cs
- MenuItemBinding.cs
- CanExecuteRoutedEventArgs.cs
- WebPartDisplayModeCancelEventArgs.cs
- assemblycache.cs
- ConfigurationHelpers.cs
- StackBuilderSink.cs
- FigureHelper.cs
- XamlBrushSerializer.cs
- NavigatorInput.cs
- IsolatedStorageFile.cs
- HitTestWithPointDrawingContextWalker.cs
- ScriptModule.cs
- ActivityExecutorDelegateInfo.cs
- RecognitionResult.cs
- DesignTimeVisibleAttribute.cs
- HierarchicalDataSourceControl.cs
- XmlSchemaObject.cs
- Ref.cs
- MasterPageParser.cs
- CommandID.cs
- ColumnClickEvent.cs
- RequestNavigateEventArgs.cs
- Psha1DerivedKeyGenerator.cs
- SystemDiagnosticsSection.cs
- ActivityCodeGenerator.cs
- FixedSOMTable.cs
- StructuralObject.cs
- XmlDocument.cs
- CodeTypeDeclarationCollection.cs
- FlowDocumentPage.cs
- ExponentialEase.cs
- ChangeInterceptorAttribute.cs
- ListViewItem.cs
- DeferredBinaryDeserializerExtension.cs
- EventsTab.cs
- XmlParserContext.cs
- TableLayoutRowStyleCollection.cs
- WindowsRebar.cs
- QilGenerator.cs
- State.cs
- NativeCppClassAttribute.cs
- EventDescriptor.cs
- DataGridViewUtilities.cs
- GeometryGroup.cs
- ReachSerializerAsync.cs
- EventBookmark.cs
- FixedDocumentSequencePaginator.cs
- SoapCommonClasses.cs
- KeyGesture.cs