Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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;
}
}
}
}
// 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.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;
}
}
}
}
// 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
- RegistryDataKey.cs
- ParagraphResult.cs
- SerialPort.cs
- FontDriver.cs
- ObsoleteAttribute.cs
- TreeNode.cs
- MenuItemStyle.cs
- D3DImage.cs
- FixedPageProcessor.cs
- Deflater.cs
- ZipArchive.cs
- figurelengthconverter.cs
- LazyLoadBehavior.cs
- GeneralTransform.cs
- Floater.cs
- XmlNamedNodeMap.cs
- ValidationEventArgs.cs
- Keywords.cs
- PersonalizablePropertyEntry.cs
- SkipStoryboardToFill.cs
- Privilege.cs
- Listbox.cs
- ServiceNameCollection.cs
- SystemTcpStatistics.cs
- CacheChildrenQuery.cs
- DataRowComparer.cs
- GeneratedCodeAttribute.cs
- SqlDataReaderSmi.cs
- GlyphsSerializer.cs
- HMACSHA1.cs
- CategoryValueConverter.cs
- WindowsSysHeader.cs
- MailWriter.cs
- XmlSchemaSet.cs
- X509CertificateStore.cs
- BuilderElements.cs
- SQLChars.cs
- AnimationStorage.cs
- EntitySet.cs
- MemoryResponseElement.cs
- DesignerAutoFormatStyle.cs
- ModelItemDictionaryImpl.cs
- LicenseContext.cs
- PathFigureCollectionConverter.cs
- __FastResourceComparer.cs
- HyperLinkColumn.cs
- ScrollBarRenderer.cs
- PinProtectionHelper.cs
- DataGridHelper.cs
- SQLRoleProvider.cs
- ResourceWriter.cs
- EntityType.cs
- SocketInformation.cs
- AddInContractAttribute.cs
- DeliveryStrategy.cs
- SymbolEqualComparer.cs
- ThemeableAttribute.cs
- SetUserLanguageRequest.cs
- RequestCacheEntry.cs
- BezierSegment.cs
- LazyTextWriterCreator.cs
- HostUtils.cs
- Rotation3D.cs
- CopyEncoder.cs
- SymbolEqualComparer.cs
- TdsParser.cs
- UnaryOperationBinder.cs
- TextTreeFixupNode.cs
- DescendantBaseQuery.cs
- StructuredCompositeActivityDesigner.cs
- CopyNamespacesAction.cs
- SearchExpression.cs
- UIElement.cs
- CacheAxisQuery.cs
- CompositeFontInfo.cs
- SingleTagSectionHandler.cs
- D3DImage.cs
- InvalidOperationException.cs
- WebPartChrome.cs
- CodeThrowExceptionStatement.cs
- NullableFloatAverageAggregationOperator.cs
- IApplicationTrustManager.cs
- EventlogProvider.cs
- InvalidOperationException.cs
- ObjectDataSourceMethodEventArgs.cs
- AVElementHelper.cs
- DbExpressionBuilder.cs
- XmlDataContract.cs
- RegexParser.cs
- WmlTextBoxAdapter.cs
- Perspective.cs
- ComponentSerializationService.cs
- EntityType.cs
- ColumnMapProcessor.cs
- BoolExpressionVisitors.cs
- FileLogRecordStream.cs
- PerfService.cs
- MetadataProperty.cs
- TransactionBridge.cs
- ProgressiveCrcCalculatingStream.cs