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
- PerfCounterSection.cs
- ValidationEventArgs.cs
- TextLine.cs
- WSSecurityPolicy.cs
- GeneralTransform.cs
- FloatMinMaxAggregationOperator.cs
- PolyLineSegment.cs
- TextBox.cs
- CompositeActivityValidator.cs
- TypeLoadException.cs
- StrokeRenderer.cs
- NullableFloatAverageAggregationOperator.cs
- Repeater.cs
- Point.cs
- MonitoringDescriptionAttribute.cs
- DecoratedNameAttribute.cs
- MenuItemBinding.cs
- WindowsStartMenu.cs
- Object.cs
- NotFiniteNumberException.cs
- Helpers.cs
- PropertyGridView.cs
- DetailsViewPagerRow.cs
- Triangle.cs
- LinqDataSourceSelectEventArgs.cs
- MultiView.cs
- DrawListViewItemEventArgs.cs
- IInstanceTable.cs
- AdCreatedEventArgs.cs
- ScrollViewer.cs
- LinkedResource.cs
- SafeLocalAllocation.cs
- util.cs
- SelectionChangedEventArgs.cs
- EastAsianLunisolarCalendar.cs
- DebuggerAttributes.cs
- HandleRef.cs
- UInt64Storage.cs
- IndentTextWriter.cs
- TransformConverter.cs
- SqlServer2KCompatibilityAnnotation.cs
- x509utils.cs
- UpDownEvent.cs
- StringFormat.cs
- DataGridViewToolTip.cs
- UnknownWrapper.cs
- FileSystemWatcher.cs
- FacetDescriptionElement.cs
- COM2IPerPropertyBrowsingHandler.cs
- UInt16Storage.cs
- HandleRef.cs
- WindowsGraphics.cs
- StreamGeometry.cs
- SrgsSubset.cs
- WebEventCodes.cs
- SchemaNames.cs
- MouseEvent.cs
- TransactionContextValidator.cs
- ActionFrame.cs
- Graphics.cs
- Transform3D.cs
- XmlSchemaAnnotation.cs
- ActivityTypeResolver.xaml.cs
- ToolStripLabel.cs
- DictionaryBase.cs
- HtmlSelect.cs
- HttpRequest.cs
- HoistedLocals.cs
- DataExpression.cs
- ConfigurationValidatorBase.cs
- Thread.cs
- DbProviderServices.cs
- FunctionDescription.cs
- PermissionListSet.cs
- ActivitiesCollection.cs
- OdbcEnvironment.cs
- PersonalizationProviderHelper.cs
- SamlAudienceRestrictionCondition.cs
- DrawingCollection.cs
- ThemeDirectoryCompiler.cs
- WebServiceAttribute.cs
- GeneratedView.cs
- ObjectDataSourceView.cs
- OpenFileDialog.cs
- XmlILStorageConverter.cs
- ConfigXmlElement.cs
- COM2FontConverter.cs
- EnumType.cs
- unsafenativemethodstextservices.cs
- BinaryEditor.cs
- PublisherMembershipCondition.cs
- SqlBuilder.cs
- UInt16.cs
- ControlValuePropertyAttribute.cs
- TableDetailsRow.cs
- IIS7ConfigurationLoader.cs
- UserMapPath.cs
- FixedBufferAttribute.cs
- SqlDataSourceCommandEventArgs.cs
- XmlSchemaComplexType.cs