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;
///
///
///
/// ExtenderProvidedPropertyAttribute is an attribute that marks that a property
/// was actually offered up by and extender provider.
///
///
[AttributeUsage(AttributeTargets.All)]
public sealed class ExtenderProvidedPropertyAttribute : Attribute {
private PropertyDescriptor extenderProperty;
private IExtenderProvider provider;
private Type receiverType;
///
/// 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
- BidOverLoads.cs
- CodePageUtils.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- DataRelationCollection.cs
- NonBatchDirectoryCompiler.cs
- HtmlTernaryTree.cs
- Vector3DAnimation.cs
- RefType.cs
- SignatureDescription.cs
- MembershipValidatePasswordEventArgs.cs
- DataGridRow.cs
- SqlAggregateChecker.cs
- CodeEventReferenceExpression.cs
- InstanceOwner.cs
- ResourcesBuildProvider.cs
- DispatcherObject.cs
- AuthenticationSchemesHelper.cs
- PartitionResolver.cs
- XmlSchemaObject.cs
- TextSelectionProcessor.cs
- Application.cs
- PersistenceProviderBehavior.cs
- LayoutManager.cs
- MouseActionValueSerializer.cs
- ChangeConflicts.cs
- GridViewDeleteEventArgs.cs
- ManifestBasedResourceGroveler.cs
- Int64AnimationUsingKeyFrames.cs
- Group.cs
- MapPathBasedVirtualPathProvider.cs
- AttachedPropertyMethodSelector.cs
- DomNameTable.cs
- ProtocolsConfigurationEntry.cs
- ExpressionStringBuilder.cs
- HostAdapter.cs
- NGCPageContentSerializerAsync.cs
- MetadataFile.cs
- SocketCache.cs
- ToolStripItemCollection.cs
- WinEventHandler.cs
- DataGridViewControlCollection.cs
- WindowInteropHelper.cs
- ColorPalette.cs
- MDIControlStrip.cs
- DataGridItemEventArgs.cs
- ToolStripItemImageRenderEventArgs.cs
- XmlSchemaAnnotated.cs
- SerialPort.cs
- PointIndependentAnimationStorage.cs
- EntityCommandDefinition.cs
- PropertyPath.cs
- WorkflowMarkupElementEventArgs.cs
- ArgumentNullException.cs
- SqlUtils.cs
- OdbcRowUpdatingEvent.cs
- LingerOption.cs
- HttpFileCollection.cs
- ElementFactory.cs
- FontCollection.cs
- InstancePersistenceCommand.cs
- FontUnitConverter.cs
- TdsParserStateObject.cs
- ReadOnlyPropertyMetadata.cs
- IdleTimeoutMonitor.cs
- Selector.cs
- ConfigurationException.cs
- EditBehavior.cs
- SoapAttributeOverrides.cs
- DisplayInformation.cs
- EncryptedPackage.cs
- listitem.cs
- PropertyValueUIItem.cs
- IProvider.cs
- ProtocolsConfigurationEntry.cs
- BamlResourceSerializer.cs
- MediaContextNotificationWindow.cs
- DataAdapter.cs
- TTSEvent.cs
- ObjectConverter.cs
- MultipartContentParser.cs
- Helpers.cs
- SortKey.cs
- CodeIdentifier.cs
- SoapTypeAttribute.cs
- StorageFunctionMapping.cs
- SqlCommandBuilder.cs
- TraceHwndHost.cs
- SingleResultAttribute.cs
- CharacterMetrics.cs
- VSWCFServiceContractGenerator.cs
- RelationshipType.cs
- SimplePropertyEntry.cs
- SoapException.cs
- NonSerializedAttribute.cs
- ProfileModule.cs
- XmlEntityReference.cs
- XmlSubtreeReader.cs
- ListView.cs
- SingleAnimation.cs
- SortedDictionary.cs