Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / AttributeProviderAttribute.cs / 1 / AttributeProviderAttribute.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.ComponentModel
{
using System;
using System.Security.Permissions;
///
///
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")]
[AttributeUsage(AttributeTargets.Property)]
public class AttributeProviderAttribute : Attribute
{
private string _typeName;
private string _propertyName;
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(string typeName)
{
if (typeName == null)
{
throw new ArgumentNullException("typeName");
}
_typeName = typeName;
}
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(string typeName, string propertyName) {
if (typeName == null) {
throw new ArgumentNullException("typeName");
}
if (propertyName == null) {
throw new ArgumentNullException("propertyName");
}
_typeName = typeName;
_propertyName = propertyName;
}
///
///
/// Creates a new AttributeProviderAttribute object.
///
public AttributeProviderAttribute(Type type)
{
if (type == null)
{
throw new ArgumentNullException("type");
}
_typeName = type.AssemblyQualifiedName;
}
///
///
/// The TypeName property returns the assembly qualified type name
/// passed into the constructor.
///
public string TypeName
{
get
{
return _typeName;
}
}
///
///
/// The TypeName property returns the property name that will be used to query attributes from.
///
public string PropertyName {
get {
return _propertyName;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlTextEncoder.cs
- XslAst.cs
- DataGridViewCellLinkedList.cs
- CodeTypeMemberCollection.cs
- ControlCollection.cs
- TimelineGroup.cs
- FormsAuthenticationConfiguration.cs
- XslTransform.cs
- SystemWebCachingSectionGroup.cs
- ManifestResourceInfo.cs
- BitmapEffectCollection.cs
- NetworkCredential.cs
- ToolstripProfessionalRenderer.cs
- XmlHierarchyData.cs
- CellParaClient.cs
- DataGridViewCellCancelEventArgs.cs
- RegexReplacement.cs
- TrackingProfile.cs
- MasterPage.cs
- DataGridViewCellStyleChangedEventArgs.cs
- NTAccount.cs
- ColumnReorderedEventArgs.cs
- HtmlContainerControl.cs
- dataprotectionpermission.cs
- ColorConverter.cs
- DescendentsWalker.cs
- ReachUIElementCollectionSerializer.cs
- DataGridRowDetailsEventArgs.cs
- Triplet.cs
- SoapTypeAttribute.cs
- WebPartConnectionsConfigureVerb.cs
- StateInitialization.cs
- DocumentPageHost.cs
- HtmlEncodedRawTextWriter.cs
- XPathItem.cs
- CodeParameterDeclarationExpressionCollection.cs
- CodeGenerator.cs
- RenderData.cs
- FilteredXmlReader.cs
- AuthorizationRule.cs
- CellParagraph.cs
- StrongTypingException.cs
- AspNetCompatibilityRequirementsMode.cs
- PropertyGridCommands.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- AdCreatedEventArgs.cs
- ProfileEventArgs.cs
- AppDomainFactory.cs
- BuildProvidersCompiler.cs
- XmlSequenceWriter.cs
- GeometryModel3D.cs
- PointCollectionConverter.cs
- EdmConstants.cs
- PasswordDeriveBytes.cs
- RowToParametersTransformer.cs
- PackageProperties.cs
- Win32KeyboardDevice.cs
- RequestStatusBarUpdateEventArgs.cs
- errorpatternmatcher.cs
- Typography.cs
- UrlMappingsModule.cs
- TypeListConverter.cs
- DecoratedNameAttribute.cs
- OpenFileDialog.cs
- ObjectHelper.cs
- ListViewItemSelectionChangedEvent.cs
- NameValueSectionHandler.cs
- ProxySimple.cs
- ProvidePropertyAttribute.cs
- Logging.cs
- Parser.cs
- XPathExpr.cs
- MsmqReceiveHelper.cs
- ImplicitInputBrush.cs
- SectionUpdates.cs
- ControlAdapter.cs
- SimpleType.cs
- FontCacheLogic.cs
- ConstraintManager.cs
- GraphicsState.cs
- MetadataArtifactLoaderCompositeFile.cs
- InputBindingCollection.cs
- XmlExceptionHelper.cs
- XmlUTF8TextReader.cs
- XamlPointCollectionSerializer.cs
- PropertyIdentifier.cs
- StylusTip.cs
- PhysicalAddress.cs
- Utility.cs
- PreviewKeyDownEventArgs.cs
- PropertyConverter.cs
- DataPagerCommandEventArgs.cs
- MessageBox.cs
- MergablePropertyAttribute.cs
- RequestDescription.cs
- AccessKeyManager.cs
- FamilyMapCollection.cs
- ClassGenerator.cs
- DiscoveryClient.cs
- isolationinterop.cs