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
- HtmlLiteralTextAdapter.cs
- GlobalItem.cs
- FtpWebRequest.cs
- OperatingSystem.cs
- DocumentViewerConstants.cs
- DataControlField.cs
- SamlEvidence.cs
- PaginationProgressEventArgs.cs
- SchemaConstraints.cs
- XmlAtomicValue.cs
- JsonReaderDelegator.cs
- ConnectionProviderAttribute.cs
- RequestStatusBarUpdateEventArgs.cs
- SecUtil.cs
- Int32KeyFrameCollection.cs
- CodeTypeDeclarationCollection.cs
- MtomMessageEncodingElement.cs
- Trustee.cs
- ObjectList.cs
- UnsafeNativeMethods.cs
- StagingAreaInputItem.cs
- TextBoxAutoCompleteSourceConverter.cs
- ResourceDescriptionAttribute.cs
- ManagedWndProcTracker.cs
- WinInetCache.cs
- XmlSerializerOperationFormatter.cs
- FileDialog_Vista.cs
- Suspend.cs
- MultiAsyncResult.cs
- StreamFormatter.cs
- TextDecorationUnitValidation.cs
- ExpandableObjectConverter.cs
- AffineTransform3D.cs
- ToolStripSplitButton.cs
- IxmlLineInfo.cs
- EncodingInfo.cs
- ArgumentOutOfRangeException.cs
- mediapermission.cs
- WmlFormAdapter.cs
- ConfigurationSettings.cs
- RemotingService.cs
- SrgsGrammar.cs
- MtomMessageEncodingElement.cs
- FamilyMap.cs
- AnimatedTypeHelpers.cs
- CurrencyWrapper.cs
- figurelengthconverter.cs
- QfeChecker.cs
- ClosableStream.cs
- VBIdentifierNameEditor.cs
- ImpersonationContext.cs
- TableColumn.cs
- ThumbAutomationPeer.cs
- Timer.cs
- TypeConstant.cs
- DefaultParameterValueAttribute.cs
- HtmlInputControl.cs
- LogReserveAndAppendState.cs
- ResourceReferenceKeyNotFoundException.cs
- ExpandCollapsePattern.cs
- PhysicalAddress.cs
- InheritanceAttribute.cs
- EdmFunction.cs
- XmlQualifiedNameTest.cs
- FixedTextContainer.cs
- AssociatedControlConverter.cs
- UniqueIdentifierService.cs
- ObjectList.cs
- SmtpCommands.cs
- Content.cs
- ContainerUtilities.cs
- XmlSchemaRedefine.cs
- SurrogateDataContract.cs
- dtdvalidator.cs
- WorkflowCompensationBehavior.cs
- SignatureTargetIdManager.cs
- PersistNameAttribute.cs
- GeometryGroup.cs
- HyperLinkField.cs
- KeyFrames.cs
- UrlAuthFailedErrorFormatter.cs
- XPSSignatureDefinition.cs
- DefaultExpressionVisitor.cs
- PTProvider.cs
- SqlGenericUtil.cs
- SelectiveScrollingGrid.cs
- SessionEndedEventArgs.cs
- SystemIcmpV6Statistics.cs
- EntryWrittenEventArgs.cs
- CannotUnloadAppDomainException.cs
- ArithmeticException.cs
- VectorKeyFrameCollection.cs
- XmlIlGenerator.cs
- UseLicense.cs
- ControlType.cs
- MatrixStack.cs
- BaseDataList.cs
- TdsParserHelperClasses.cs
- PageCodeDomTreeGenerator.cs
- EmptyControlCollection.cs