Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / ExtenderProvidedPropertyAttribute.cs / 1305376 / ExtenderProvidedPropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// /// [AttributeUsage(AttributeTargets.All)] public sealed class ExtenderProvidedPropertyAttribute : Attribute { private PropertyDescriptor extenderProperty; private IExtenderProvider provider; private Type receiverType; ////// ExtenderProvidedPropertyAttribute is an attribute that marks that a property /// was actually offered up by and extender provider. /// ////// Creates a new ExtenderProvidedPropertyAttribute. /// internal static ExtenderProvidedPropertyAttribute Create(PropertyDescriptor extenderProperty, Type receiverType, IExtenderProvider provider) { ExtenderProvidedPropertyAttribute e = new ExtenderProvidedPropertyAttribute(); e.extenderProperty = extenderProperty; e.receiverType = receiverType; e.provider = provider; return e; } ////// Creates an empty ExtenderProvidedPropertyAttribute. /// public ExtenderProvidedPropertyAttribute() { } ////// PropertyDescriptor of the property that is being provided. /// public PropertyDescriptor ExtenderProperty { get { return extenderProperty; } } ////// Extender provider that is providing the property. /// public IExtenderProvider Provider { get { return provider; } } ////// The type of object that can receive these properties. /// public Type ReceiverType { get { return receiverType; } } public override bool Equals(object obj) { if (obj == this) { return true; } ExtenderProvidedPropertyAttribute other = obj as ExtenderProvidedPropertyAttribute; return (other != null) && other.extenderProperty.Equals(extenderProperty) && other.provider.Equals(provider) && other.receiverType.Equals(receiverType); } public override int GetHashCode() { return base.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return receiverType == null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; ////// /// [AttributeUsage(AttributeTargets.All)] public sealed class ExtenderProvidedPropertyAttribute : Attribute { private PropertyDescriptor extenderProperty; private IExtenderProvider provider; private Type receiverType; ////// ExtenderProvidedPropertyAttribute is an attribute that marks that a property /// was actually offered up by and extender provider. /// ////// Creates a new ExtenderProvidedPropertyAttribute. /// internal static ExtenderProvidedPropertyAttribute Create(PropertyDescriptor extenderProperty, Type receiverType, IExtenderProvider provider) { ExtenderProvidedPropertyAttribute e = new ExtenderProvidedPropertyAttribute(); e.extenderProperty = extenderProperty; e.receiverType = receiverType; e.provider = provider; return e; } ////// Creates an empty ExtenderProvidedPropertyAttribute. /// public ExtenderProvidedPropertyAttribute() { } ////// PropertyDescriptor of the property that is being provided. /// public PropertyDescriptor ExtenderProperty { get { return extenderProperty; } } ////// Extender provider that is providing the property. /// public IExtenderProvider Provider { get { return provider; } } ////// The type of object that can receive these properties. /// public Type ReceiverType { get { return receiverType; } } public override bool Equals(object obj) { if (obj == this) { return true; } ExtenderProvidedPropertyAttribute other = obj as ExtenderProvidedPropertyAttribute; return (other != null) && other.extenderProperty.Equals(extenderProperty) && other.provider.Equals(provider) && other.receiverType.Equals(receiverType); } public override int GetHashCode() { return base.GetHashCode(); } ////// /// public override bool IsDefaultAttribute() { return receiverType == null; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SetIterators.cs
- DropSourceBehavior.cs
- WebBrowsableAttribute.cs
- UndoManager.cs
- ExpressionPrinter.cs
- Double.cs
- connectionpool.cs
- ReadOnlyHierarchicalDataSource.cs
- SecureEnvironment.cs
- TransformGroup.cs
- ExpressionBuilderContext.cs
- CodeSubDirectoriesCollection.cs
- MetadataStore.cs
- DeclaredTypeElement.cs
- IncrementalReadDecoders.cs
- MDIControlStrip.cs
- PrintController.cs
- FactoryRecord.cs
- XmlValidatingReaderImpl.cs
- AspNetRouteServiceHttpHandler.cs
- CommonObjectSecurity.cs
- Zone.cs
- ManagementEventWatcher.cs
- Win32MouseDevice.cs
- ServiceInstallComponent.cs
- DateTimeFormat.cs
- SqlColumnizer.cs
- DbProviderFactories.cs
- RunClient.cs
- CodeSubDirectoriesCollection.cs
- BrowserCapabilitiesFactory.cs
- FilterQuery.cs
- PartialToken.cs
- MetabaseServerConfig.cs
- XmlBinaryWriterSession.cs
- TextServicesHost.cs
- XamlToRtfWriter.cs
- DataMemberFieldEditor.cs
- DesignerActionPanel.cs
- XmlSerializerAssemblyAttribute.cs
- Floater.cs
- FrameworkElementAutomationPeer.cs
- WebReferencesBuildProvider.cs
- DataTableReader.cs
- TranslateTransform3D.cs
- invalidudtexception.cs
- ObjectTag.cs
- Cursor.cs
- MemberHolder.cs
- InvokeProviderWrapper.cs
- ActivationWorker.cs
- BamlLocalizabilityResolver.cs
- Form.cs
- MeasureItemEvent.cs
- SocketInformation.cs
- XmlValidatingReader.cs
- Int64KeyFrameCollection.cs
- UserControlCodeDomTreeGenerator.cs
- LinqExpressionNormalizer.cs
- RegexMatch.cs
- RegistryConfigurationProvider.cs
- SortFieldComparer.cs
- ColorConvertedBitmapExtension.cs
- ArrangedElement.cs
- LayoutTable.cs
- ValidatingReaderNodeData.cs
- WindowInteropHelper.cs
- NetworkInformationException.cs
- WebPartConnectionsConfigureVerb.cs
- BitmapDownload.cs
- WebPart.cs
- MemberAssignmentAnalysis.cs
- TextHidden.cs
- FontConverter.cs
- CalendarKeyboardHelper.cs
- RijndaelManaged.cs
- SectionRecord.cs
- BevelBitmapEffect.cs
- DeviceSpecificChoiceCollection.cs
- NullableConverter.cs
- SR.cs
- TickBar.cs
- PageCatalogPart.cs
- BrowserDefinition.cs
- _TransmitFileOverlappedAsyncResult.cs
- DbDataReader.cs
- NullRuntimeConfig.cs
- TextProviderWrapper.cs
- UseManagedPresentationElement.cs
- Converter.cs
- X509InitiatorCertificateServiceElement.cs
- DynamicMethod.cs
- EntitySqlQueryState.cs
- MatrixCamera.cs
- DateTimeOffset.cs
- FrameworkTemplate.cs
- MetadataException.cs
- BadImageFormatException.cs
- BaseDataBoundControl.cs
- TraceUtils.cs