Code:
/ DotNET / DotNET / 8.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
- LayoutSettings.cs
- ToolboxItemFilterAttribute.cs
- ComponentCodeDomSerializer.cs
- DataGridViewTextBoxCell.cs
- XsdCachingReader.cs
- GestureRecognitionResult.cs
- SQLDecimalStorage.cs
- Inflater.cs
- SynchronousSendBindingElement.cs
- RepeaterCommandEventArgs.cs
- CategoryGridEntry.cs
- QilLiteral.cs
- ColorPalette.cs
- TimeStampChecker.cs
- Drawing.cs
- DependencyPropertyAttribute.cs
- DbConnectionOptions.cs
- ITreeGenerator.cs
- Paragraph.cs
- CharEnumerator.cs
- ContextMenuStrip.cs
- DetailsViewUpdateEventArgs.cs
- OlePropertyStructs.cs
- DragStartedEventArgs.cs
- DateTimeFormatInfoScanner.cs
- ChildTable.cs
- ListItemConverter.cs
- HMACSHA512.cs
- XPathBinder.cs
- CryptoStream.cs
- RemotingServices.cs
- XsltLibrary.cs
- WebPartConnection.cs
- PrintPreviewDialog.cs
- ColorConvertedBitmapExtension.cs
- SectionInput.cs
- InheritablePropertyChangeInfo.cs
- Int32RectValueSerializer.cs
- ListViewCancelEventArgs.cs
- HttpEncoder.cs
- SQLRoleProvider.cs
- SharedStream.cs
- SrgsToken.cs
- InvokeProviderWrapper.cs
- ExclusiveTcpListener.cs
- CodeAttributeArgument.cs
- SizeIndependentAnimationStorage.cs
- HiddenFieldPageStatePersister.cs
- XPathNavigatorReader.cs
- PlainXmlDeserializer.cs
- LocalizationComments.cs
- SqlBulkCopyColumnMapping.cs
- EventWaitHandleSecurity.cs
- Compiler.cs
- ActivityWithResultConverter.cs
- NamespaceList.cs
- ResourceReferenceExpressionConverter.cs
- Suspend.cs
- NotConverter.cs
- HwndSourceKeyboardInputSite.cs
- PlaceHolder.cs
- InlinedAggregationOperator.cs
- HijriCalendar.cs
- TagPrefixAttribute.cs
- UserUseLicenseDictionaryLoader.cs
- ChtmlTextWriter.cs
- XmlSchemaImporter.cs
- PartitionResolver.cs
- SelectionService.cs
- DataColumnChangeEvent.cs
- MaterialGroup.cs
- SiteMapNode.cs
- AdRotator.cs
- TransactionManagerProxy.cs
- RoleServiceManager.cs
- SimpleParser.cs
- StubHelpers.cs
- DrawingContext.cs
- SoapHeader.cs
- ArrayTypeMismatchException.cs
- GroupDescription.cs
- SQLByteStorage.cs
- TemplateInstanceAttribute.cs
- CryptoApi.cs
- Version.cs
- XmlSchemaSimpleContentRestriction.cs
- FigureParaClient.cs
- CodeSpit.cs
- RegexNode.cs
- ReflectionPermission.cs
- ServiceSettingsResponseInfo.cs
- RuleSettings.cs
- RichTextBoxAutomationPeer.cs
- tabpagecollectioneditor.cs
- SelectionListComponentEditor.cs
- XmlReader.cs
- RawStylusInputReport.cs
- WpfWebRequestHelper.cs
- CodeMemberProperty.cs
- ConfigurationElement.cs