Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ProvidePropertyAttribute.cs / 1305376 / 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 ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- filewebrequest.cs
- HttpContext.cs
- HwndSourceKeyboardInputSite.cs
- WorkflowDurableInstance.cs
- RtfToXamlReader.cs
- TextBoxAutomationPeer.cs
- StreamUpgradeAcceptor.cs
- SessionState.cs
- HelpProvider.cs
- PropertyKey.cs
- PageCatalogPartDesigner.cs
- TraceInternal.cs
- XPathDocumentNavigator.cs
- NameSpaceExtractor.cs
- DataTableReaderListener.cs
- AutomationPropertyInfo.cs
- MultiSelectRootGridEntry.cs
- WebPartTransformer.cs
- SizeChangedInfo.cs
- basemetadatamappingvisitor.cs
- WebPartDescription.cs
- SpnEndpointIdentity.cs
- ColorMap.cs
- TableSectionStyle.cs
- TimerElapsedEvenArgs.cs
- SortedDictionary.cs
- Quaternion.cs
- SaveFileDialog.cs
- __TransparentProxy.cs
- SafeUserTokenHandle.cs
- GridViewEditEventArgs.cs
- MenuAutomationPeer.cs
- PageHandlerFactory.cs
- XmlArrayItemAttributes.cs
- PageTheme.cs
- DataColumnCollection.cs
- ListenerElementsCollection.cs
- CommonDialog.cs
- MD5CryptoServiceProvider.cs
- _OSSOCK.cs
- ExpressionNode.cs
- ExtentKey.cs
- UriParserTemplates.cs
- SByteStorage.cs
- IgnoreFileBuildProvider.cs
- XmlDataFileEditor.cs
- ComPlusTypeValidator.cs
- ObjectNavigationPropertyMapping.cs
- XsltArgumentList.cs
- StyleSelector.cs
- SqlFunctionAttribute.cs
- ExclusiveCanonicalizationTransform.cs
- DbConvert.cs
- DuplexChannelBinder.cs
- StylusPlugin.cs
- FormatterConverter.cs
- MSAAEventDispatcher.cs
- BitmapEffectGroup.cs
- ToolStripPanelRow.cs
- StatusBar.cs
- FlowLayoutSettings.cs
- DataObjectCopyingEventArgs.cs
- DataSysAttribute.cs
- XmlSchemaAppInfo.cs
- WebPartConnectionsConfigureVerb.cs
- X500Name.cs
- FixedTextContainer.cs
- SectionInformation.cs
- GlyphRun.cs
- ClientProxyGenerator.cs
- Separator.cs
- SvcMapFileSerializer.cs
- SafeHandles.cs
- AmbientValueAttribute.cs
- TextTreeObjectNode.cs
- Deflater.cs
- Queue.cs
- HtmlTableRowCollection.cs
- RawStylusInputCustomData.cs
- WhitespaceRule.cs
- WindowsListViewGroupHelper.cs
- DashStyle.cs
- DbProviderManifest.cs
- UIElementPropertyUndoUnit.cs
- GatewayIPAddressInformationCollection.cs
- TypedTableGenerator.cs
- LinqDataSourceEditData.cs
- WinCategoryAttribute.cs
- DateTime.cs
- ColorConverter.cs
- TableDetailsCollection.cs
- DropSource.cs
- LineGeometry.cs
- StringBuilder.cs
- DataQuery.cs
- CacheRequest.cs
- MULTI_QI.cs
- SecurityException.cs
- EditorAttribute.cs
- SQLBoolean.cs