Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MultitargetUtil.cs
- UIElementParagraph.cs
- FrameworkElementFactory.cs
- DrawingBrush.cs
- ControlPaint.cs
- OleDbParameterCollection.cs
- PathParser.cs
- OdbcCommand.cs
- TdsParser.cs
- EnumUnknown.cs
- LayoutTableCell.cs
- ServerValidateEventArgs.cs
- GeneralTransform3D.cs
- SchemaImporterExtensionsSection.cs
- SecurityContext.cs
- InvalidComObjectException.cs
- SqlBulkCopy.cs
- FrameworkRichTextComposition.cs
- TextSegment.cs
- StateManager.cs
- BuildManagerHost.cs
- DataColumnChangeEvent.cs
- GradientStop.cs
- DesignTimeParseData.cs
- KeyGestureValueSerializer.cs
- LinqDataSourceView.cs
- RuntimeConfigLKG.cs
- ByteAnimation.cs
- Manipulation.cs
- FontNamesConverter.cs
- ReferencedAssembly.cs
- ThreadExceptionDialog.cs
- SQLResource.cs
- RangeBaseAutomationPeer.cs
- AutoCompleteStringCollection.cs
- ProcessHostServerConfig.cs
- DataTableReader.cs
- ToolStripMenuItemCodeDomSerializer.cs
- UnknownBitmapEncoder.cs
- XsltException.cs
- DragDrop.cs
- TabPage.cs
- XmlnsDictionary.cs
- XamlToRtfParser.cs
- ColorBlend.cs
- PasswordTextNavigator.cs
- WebPartManager.cs
- ClientApiGenerator.cs
- HttpCapabilitiesSectionHandler.cs
- ProviderConnectionPointCollection.cs
- OrderedHashRepartitionEnumerator.cs
- Wizard.cs
- SRef.cs
- PenLineJoinValidation.cs
- StrokeNode.cs
- AspNetHostingPermission.cs
- SignatureDescription.cs
- PersistenceProviderElement.cs
- StructuredType.cs
- Type.cs
- TextBoxDesigner.cs
- CacheMemory.cs
- _ConnectionGroup.cs
- ExternalCalls.cs
- FileLogRecord.cs
- FlowSwitch.cs
- SortDescription.cs
- AsymmetricSignatureFormatter.cs
- WCFServiceClientProxyGenerator.cs
- DataGridColumn.cs
- userdatakeys.cs
- RoutedCommand.cs
- CategoryNameCollection.cs
- Util.cs
- XmlReflectionMember.cs
- SerialPinChanges.cs
- DataRowComparer.cs
- MatrixAnimationBase.cs
- NotificationContext.cs
- StateDesigner.Helpers.cs
- ItemContainerProviderWrapper.cs
- BooleanStorage.cs
- DivideByZeroException.cs
- FixedSOMPageConstructor.cs
- DynamicValueConverter.cs
- Margins.cs
- SplitterCancelEvent.cs
- CharacterMetricsDictionary.cs
- UseManagedPresentationElement.cs
- TransportBindingElement.cs
- InvalidOleVariantTypeException.cs
- PrimitiveSchema.cs
- MyContact.cs
- SqlProviderServices.cs
- FrameworkContentElementAutomationPeer.cs
- Vector.cs
- ResourceSetExpression.cs
- ChangeBlockUndoRecord.cs
- SkinBuilder.cs
- SymmetricKey.cs