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
- SchemaDeclBase.cs
- FixedTextSelectionProcessor.cs
- NonVisualControlAttribute.cs
- DataGridDetailsPresenter.cs
- safelink.cs
- NetSectionGroup.cs
- TextAnchor.cs
- Win32Exception.cs
- CompoundFileReference.cs
- Delay.cs
- FunctionUpdateCommand.cs
- EngineSiteSapi.cs
- TextEndOfSegment.cs
- ResXFileRef.cs
- IgnoreFlushAndCloseStream.cs
- DES.cs
- PeerNearMe.cs
- ToolStripPanel.cs
- ArrangedElementCollection.cs
- DiagnosticTrace.cs
- CompressEmulationStream.cs
- BaseDataListComponentEditor.cs
- BinaryConverter.cs
- FontEditor.cs
- CancellationTokenSource.cs
- DeliveryStrategy.cs
- StreamWriter.cs
- HttpRequest.cs
- StorageComplexTypeMapping.cs
- SpecialNameAttribute.cs
- VisualTreeFlattener.cs
- PageHandlerFactory.cs
- MimeTextImporter.cs
- PrintPageEvent.cs
- ObjectNavigationPropertyMapping.cs
- WebEventCodes.cs
- System.Data.OracleClient_BID.cs
- DefaultBinder.cs
- Visitor.cs
- SecureConversationDriver.cs
- ConfigurationElementCollection.cs
- TraceData.cs
- XmlSchema.cs
- SymbolTable.cs
- ErrorLog.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- NumberSubstitution.cs
- Size3D.cs
- SiteMapPathDesigner.cs
- BmpBitmapEncoder.cs
- UIElementCollection.cs
- ObjectKeyFrameCollection.cs
- InlineUIContainer.cs
- SimpleType.cs
- DataGridSortCommandEventArgs.cs
- MultipleFilterMatchesException.cs
- ScalarConstant.cs
- SectionRecord.cs
- FileDialogCustomPlacesCollection.cs
- AuthenticodeSignatureInformation.cs
- SchemaNames.cs
- TextTreeExtractElementUndoUnit.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- ExtensibleClassFactory.cs
- DbConnectionPoolGroupProviderInfo.cs
- TransactionException.cs
- ObjectStateManager.cs
- LocalFileSettingsProvider.cs
- Internal.cs
- GeneralTransform3D.cs
- GlyphRunDrawing.cs
- TabItemAutomationPeer.cs
- XmlCodeExporter.cs
- CanonicalXml.cs
- ConfigViewGenerator.cs
- DropAnimation.xaml.cs
- Rect.cs
- ObjectDataSourceFilteringEventArgs.cs
- XPathParser.cs
- MemberDomainMap.cs
- DataFormats.cs
- DefaultExpressionVisitor.cs
- HttpCacheVary.cs
- LocatorPart.cs
- OleDbInfoMessageEvent.cs
- ReceiveErrorHandling.cs
- IconBitmapDecoder.cs
- AddressingProperty.cs
- QilBinary.cs
- XmlSchemaSimpleTypeList.cs
- ConnectorSelectionGlyph.cs
- NativeMethods.cs
- OutputCacheSettings.cs
- MenuItem.cs
- PointKeyFrameCollection.cs
- QualifiedCellIdBoolean.cs
- ScriptResourceMapping.cs
- ParserHooks.cs
- HtmlWindowCollection.cs
- AdRotator.cs