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
- isolationinterop.cs
- ColorAnimationUsingKeyFrames.cs
- MetadataWorkspace.cs
- ViewUtilities.cs
- LOSFormatter.cs
- EventSetter.cs
- XmlElementList.cs
- ChannelManagerBase.cs
- ObjectNotFoundException.cs
- ReferencedType.cs
- NativeMethods.cs
- Identifier.cs
- VerticalAlignConverter.cs
- DataRelationCollection.cs
- LinkGrep.cs
- ColorAnimationBase.cs
- BinaryUtilClasses.cs
- FragmentQueryProcessor.cs
- WmlValidatorAdapter.cs
- DbConnectionPoolCounters.cs
- Graphics.cs
- CapabilitiesPattern.cs
- PrintDialog.cs
- Fonts.cs
- IdentityManager.cs
- HitTestResult.cs
- EasingFunctionBase.cs
- ApplicationServiceManager.cs
- SplitterPanel.cs
- DataSet.cs
- BitmapFrame.cs
- DataBindingList.cs
- UriTemplateMatch.cs
- DelimitedListTraceListener.cs
- SQLResource.cs
- TagPrefixInfo.cs
- ChineseLunisolarCalendar.cs
- DropShadowBitmapEffect.cs
- ClientBase.cs
- GroupBoxRenderer.cs
- RadioButtonRenderer.cs
- AuthenticationSection.cs
- WebControlsSection.cs
- ServiceActivationException.cs
- SymbolUsageManager.cs
- HttpResponseInternalBase.cs
- HtmlSelect.cs
- AggregationMinMaxHelpers.cs
- BidPrivateBase.cs
- OutputCacheModule.cs
- WithStatement.cs
- InternalEnumValidator.cs
- LoginView.cs
- Decoder.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- SystemPens.cs
- ContextMenuService.cs
- ProtocolsConfiguration.cs
- PackageDigitalSignatureManager.cs
- ActivityScheduledRecord.cs
- UserValidatedEventArgs.cs
- InputReport.cs
- UnsafeNativeMethods.cs
- embossbitmapeffect.cs
- DataGridViewSortCompareEventArgs.cs
- OleStrCAMarshaler.cs
- ConvertTextFrag.cs
- ActivityTrace.cs
- ToolStripLocationCancelEventArgs.cs
- GridViewRowPresenter.cs
- MetadataItem_Static.cs
- HtmlPhoneCallAdapter.cs
- SqlProfileProvider.cs
- IndexerNameAttribute.cs
- ContentControl.cs
- OracleString.cs
- DBAsyncResult.cs
- Win32Exception.cs
- IntegerValidatorAttribute.cs
- PropertyRecord.cs
- OdbcError.cs
- EntityParameter.cs
- XPathEmptyIterator.cs
- DataGridPagingPage.cs
- NameValuePair.cs
- TextEffect.cs
- ConnectorDragDropGlyph.cs
- FieldAccessException.cs
- TextFormatterContext.cs
- SystemParameters.cs
- FormattedTextSymbols.cs
- ObjectDataSourceSelectingEventArgs.cs
- ConfigXmlAttribute.cs
- XmlSchemaAttributeGroup.cs
- FactoryGenerator.cs
- ManagementNamedValueCollection.cs
- SafeEventLogWriteHandle.cs
- FieldAccessException.cs
- HtmlWindow.cs
- EmptyEnumerator.cs