Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / ExtenderProvidedPropertyAttribute.cs / 1 / 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; } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EdmEntityTypeAttribute.cs
- OleDbError.cs
- ColumnCollection.cs
- ControlBuilderAttribute.cs
- KnownBoxes.cs
- DynamicResourceExtensionConverter.cs
- CurrencyWrapper.cs
- ICspAsymmetricAlgorithm.cs
- AutomationElementIdentifiers.cs
- SoapIncludeAttribute.cs
- CodeExporter.cs
- CodeNamespace.cs
- FormattedTextSymbols.cs
- FixedStringLookup.cs
- AlternationConverter.cs
- EmissiveMaterial.cs
- AuthenticationModuleElement.cs
- DependencySource.cs
- ViewStateException.cs
- WebPartConnectionsCloseVerb.cs
- CapabilitiesRule.cs
- ConfigurationValidatorAttribute.cs
- HtmlButton.cs
- TypeToStringValueConverter.cs
- X509Utils.cs
- _IPv4Address.cs
- XmlAtomicValue.cs
- SmtpClient.cs
- Token.cs
- remotingproxy.cs
- ChildrenQuery.cs
- NodeFunctions.cs
- ADMembershipProvider.cs
- InstanceKey.cs
- RefreshEventArgs.cs
- ExtensibleClassFactory.cs
- BackStopAuthenticationModule.cs
- UrlMapping.cs
- TcpPortSharing.cs
- ImageBrush.cs
- GroupBoxDesigner.cs
- ExpressionVisitor.cs
- StatusBarAutomationPeer.cs
- InstanceData.cs
- Bidi.cs
- IdentifierCollection.cs
- BodyGlyph.cs
- CommonRemoteMemoryBlock.cs
- SelectionBorderGlyph.cs
- StringArrayConverter.cs
- HandleScope.cs
- XmlText.cs
- documentation.cs
- ArrayWithOffset.cs
- MetabaseReader.cs
- TaiwanCalendar.cs
- RotateTransform3D.cs
- SupportsPreviewControlAttribute.cs
- MediaPlayerState.cs
- ListViewInsertionMark.cs
- CodeMemberEvent.cs
- FormatSettings.cs
- SubMenuStyle.cs
- ManipulationLogic.cs
- Internal.cs
- UnsafeNativeMethods.cs
- AdPostCacheSubstitution.cs
- ToolStripLocationCancelEventArgs.cs
- PersonalizablePropertyEntry.cs
- WebPartCloseVerb.cs
- Configuration.cs
- AttributeUsageAttribute.cs
- basevalidator.cs
- SQLInt64Storage.cs
- GZipObjectSerializer.cs
- ScrollEventArgs.cs
- GlyphRunDrawing.cs
- ChtmlTextWriter.cs
- NotSupportedException.cs
- AnnotationComponentChooser.cs
- LockCookie.cs
- GroupAggregateExpr.cs
- CustomTokenProvider.cs
- ParameterToken.cs
- BamlWriter.cs
- SizeKeyFrameCollection.cs
- UserNameSecurityToken.cs
- XmlSchemaComplexContentRestriction.cs
- BulletedListEventArgs.cs
- ServicePoint.cs
- XmlNodeChangedEventManager.cs
- UnmanagedHandle.cs
- IResourceProvider.cs
- SynchronizationScope.cs
- WindowsSolidBrush.cs
- ClientData.cs
- RemoteDebugger.cs
- DocumentProperties.cs
- ReadOnlyDataSource.cs
- BezierSegment.cs