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
- RadialGradientBrush.cs
- XmlSignatureManifest.cs
- InvalidAsynchronousStateException.cs
- ThreadExceptionEvent.cs
- KeyFrames.cs
- HttpListenerRequestTraceRecord.cs
- StringToken.cs
- ColorInterpolationModeValidation.cs
- UserInitiatedNavigationPermission.cs
- OracleSqlParser.cs
- XpsS0ValidatingLoader.cs
- ExpressionEditorAttribute.cs
- XmlSchemaDocumentation.cs
- ListViewItemEventArgs.cs
- CompilationSection.cs
- OnOperation.cs
- SkipQueryOptionExpression.cs
- Button.cs
- BitmapEffectGeneralTransform.cs
- TableLayoutStyle.cs
- TreeView.cs
- ControlParameter.cs
- Span.cs
- ChangePasswordAutoFormat.cs
- FontNamesConverter.cs
- DirtyTextRange.cs
- StreamedWorkflowDefinitionContext.cs
- DataGridViewSelectedColumnCollection.cs
- WhitespaceRuleLookup.cs
- EmptyWithCancelationCheckWorkItem.cs
- WS2007HttpBinding.cs
- MetadataArtifactLoader.cs
- XmlQualifiedName.cs
- PreProcessInputEventArgs.cs
- MatrixIndependentAnimationStorage.cs
- TripleDESCryptoServiceProvider.cs
- PassportAuthenticationEventArgs.cs
- CqlIdentifiers.cs
- ReferencedAssemblyResolver.cs
- SQLMembershipProvider.cs
- TrustSection.cs
- WebPartConnectVerb.cs
- MasterPage.cs
- PartialCachingControl.cs
- LinqDataSourceStatusEventArgs.cs
- HTMLTextWriter.cs
- ControlIdConverter.cs
- PropertyDescriptorCollection.cs
- ScalarConstant.cs
- Table.cs
- CompositeFontInfo.cs
- SoapMessage.cs
- EditingScopeUndoUnit.cs
- AstTree.cs
- EdmFunction.cs
- PtsContext.cs
- BinaryConverter.cs
- Crc32Helper.cs
- ApplicationSecurityManager.cs
- FontUnitConverter.cs
- CodeBlockBuilder.cs
- ContextMarshalException.cs
- TemplateManager.cs
- XmlAutoDetectWriter.cs
- Misc.cs
- NamespaceEmitter.cs
- StreamMarshaler.cs
- DataSourceCollectionBase.cs
- SQLMembershipProvider.cs
- Misc.cs
- Visual3D.cs
- FastEncoder.cs
- SqlGatherProducedAliases.cs
- RegexMatchCollection.cs
- HttpCapabilitiesSectionHandler.cs
- FontDifferentiator.cs
- SrgsElement.cs
- ImplicitInputBrush.cs
- DataObjectFieldAttribute.cs
- WindowsButton.cs
- HtmlInputPassword.cs
- EditorBrowsableAttribute.cs
- TraceXPathNavigator.cs
- CapabilitiesPattern.cs
- MembershipSection.cs
- ApplicationProxyInternal.cs
- RealProxy.cs
- ProgressBarRenderer.cs
- DbConnectionHelper.cs
- ProcessModelSection.cs
- CodeStatement.cs
- TextPointer.cs
- RequiredAttributeAttribute.cs
- Size3D.cs
- Exceptions.cs
- IEnumerable.cs
- TemplateKeyConverter.cs
- TcpTransportManager.cs
- CheckBox.cs
- ToolTipAutomationPeer.cs