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;
///
///
///
/// 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;
}
}
}
// 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;
///
///
///
/// 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;
}
}
}
// 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
- Utils.cs
- QueryPageSettingsEventArgs.cs
- shaperfactory.cs
- RoleGroupCollection.cs
- ObjectViewQueryResultData.cs
- AdRotator.cs
- MouseWheelEventArgs.cs
- Attributes.cs
- FontStretches.cs
- CollectionChangeEventArgs.cs
- AlignmentYValidation.cs
- CodeCompileUnit.cs
- TreeViewAutomationPeer.cs
- ErrorTableItemStyle.cs
- DecoderFallbackWithFailureFlag.cs
- TextSegment.cs
- SecurityTokenValidationException.cs
- OleDbCommand.cs
- IISUnsafeMethods.cs
- LabelLiteral.cs
- MissingSatelliteAssemblyException.cs
- LockedActivityGlyph.cs
- DefaultBinder.cs
- DetailsViewDeletedEventArgs.cs
- CorrelationExtension.cs
- PassportIdentity.cs
- ArrayHelper.cs
- BindingContext.cs
- XmlWriterTraceListener.cs
- DependencyPropertyHelper.cs
- Point3DIndependentAnimationStorage.cs
- Graphics.cs
- RayMeshGeometry3DHitTestResult.cs
- CacheHelper.cs
- AndAlso.cs
- XmlEncodedRawTextWriter.cs
- InteropAutomationProvider.cs
- StrokeNodeData.cs
- EventMetadata.cs
- CacheRequest.cs
- ProcessHost.cs
- DesignColumnCollection.cs
- ConsoleTraceListener.cs
- DocumentOrderComparer.cs
- Converter.cs
- TTSVoice.cs
- MonitoringDescriptionAttribute.cs
- WebPart.cs
- HttpClientCertificate.cs
- NotConverter.cs
- WebSysDisplayNameAttribute.cs
- RegisteredExpandoAttribute.cs
- OpenFileDialog.cs
- ScrollChangedEventArgs.cs
- ConnectionsZone.cs
- MultipartContentParser.cs
- CompositeFontInfo.cs
- Header.cs
- DesignerCommandSet.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- objectresult_tresulttype.cs
- Enum.cs
- DictionaryTraceRecord.cs
- BamlRecordWriter.cs
- ComAdminInterfaces.cs
- Keywords.cs
- XmlBufferedByteStreamReader.cs
- FacetEnabledSchemaElement.cs
- AutoResetEvent.cs
- CatalogPartCollection.cs
- ExtentCqlBlock.cs
- ChtmlPhoneCallAdapter.cs
- EntitySqlQueryCacheKey.cs
- __Filters.cs
- TypeSchema.cs
- XmlSchemaInclude.cs
- EnglishPluralizationService.cs
- MembershipUser.cs
- NameValuePair.cs
- OdbcUtils.cs
- HttpCookiesSection.cs
- CryptoApi.cs
- WebConfigurationFileMap.cs
- InputScope.cs
- DataSourceCache.cs
- MemberBinding.cs
- ParserExtension.cs
- WebPartPersonalization.cs
- precedingquery.cs
- TextSegment.cs
- WebPartActionVerb.cs
- ClientData.cs
- ToolbarAUtomationPeer.cs
- ExpressionNode.cs
- WebServiceResponse.cs
- AspNetSynchronizationContext.cs
- ControlBuilder.cs
- WebSysDefaultValueAttribute.cs
- KeyProperty.cs
- PtsPage.cs