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
- WriteableBitmap.cs
- HwndKeyboardInputProvider.cs
- PolicyStatement.cs
- AsyncPostBackTrigger.cs
- XmlParserContext.cs
- InvalidCommandTreeException.cs
- Vector.cs
- ScriptingAuthenticationServiceSection.cs
- RtfControlWordInfo.cs
- BindingMAnagerBase.cs
- ArraySegment.cs
- BamlRecordReader.cs
- HtmlInputPassword.cs
- TypeDelegator.cs
- FilePrompt.cs
- Vector3dCollection.cs
- AspNetHostingPermission.cs
- SimplePropertyEntry.cs
- AnonymousIdentificationModule.cs
- WebRequest.cs
- HMACRIPEMD160.cs
- Int32Storage.cs
- Vector.cs
- Win32KeyboardDevice.cs
- RelativeSource.cs
- Component.cs
- ProtectedConfigurationProviderCollection.cs
- PointLight.cs
- TypefaceMetricsCache.cs
- SqlWriter.cs
- WindowShowOrOpenTracker.cs
- StringSorter.cs
- DllNotFoundException.cs
- WSHttpSecurity.cs
- NullReferenceException.cs
- SapiGrammar.cs
- SymDocumentType.cs
- SafeNativeMethods.cs
- XPathNavigator.cs
- URLMembershipCondition.cs
- XmlSerializerVersionAttribute.cs
- CalendarDay.cs
- ImageClickEventArgs.cs
- SystemPens.cs
- DebuggerAttributes.cs
- SystemInformation.cs
- _NTAuthentication.cs
- ObjectFullSpanRewriter.cs
- ManagedWndProcTracker.cs
- WorkflowTraceTransfer.cs
- CodeAttributeArgumentCollection.cs
- FactorySettingsElement.cs
- ExceptionUtil.cs
- AsyncDataRequest.cs
- SoapTypeAttribute.cs
- CodeSnippetExpression.cs
- SecondaryIndexDefinition.cs
- UrlMapping.cs
- HtmlAnchor.cs
- CodeMemberMethod.cs
- TextTreeExtractElementUndoUnit.cs
- CompilationUtil.cs
- SignatureToken.cs
- SqlTypeSystemProvider.cs
- ResourceAssociationSet.cs
- ConfigurationSectionGroup.cs
- Html32TextWriter.cs
- ControlCommandSet.cs
- KnownBoxes.cs
- CreateRefExpr.cs
- dataprotectionpermissionattribute.cs
- TextWriter.cs
- XslAst.cs
- ToolStripPanelRenderEventArgs.cs
- FormsAuthenticationModule.cs
- SurrogateEncoder.cs
- _NegoStream.cs
- UdpChannelListener.cs
- DesignerActionUI.cs
- Point3D.cs
- DocumentSchemaValidator.cs
- Figure.cs
- DesignSurfaceServiceContainer.cs
- HtmlElementCollection.cs
- MethodBody.cs
- RequestQueue.cs
- FacetChecker.cs
- TimeSpanOrInfiniteConverter.cs
- MimeWriter.cs
- Cursor.cs
- BoundColumn.cs
- metrodevice.cs
- RefType.cs
- TransactionBridge.cs
- Int64AnimationUsingKeyFrames.cs
- RunWorkerCompletedEventArgs.cs
- DocumentGrid.cs
- XmlSiteMapProvider.cs
- HttpHeaderCollection.cs
- JsonSerializer.cs