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
- PersonalizationDictionary.cs
- GridViewRowPresenterBase.cs
- OledbConnectionStringbuilder.cs
- LongValidatorAttribute.cs
- StylusPointDescription.cs
- NameValueConfigurationElement.cs
- EntityContainerEmitter.cs
- FloatUtil.cs
- StatusBarPanel.cs
- EnvironmentPermission.cs
- TrackingProfile.cs
- DoubleConverter.cs
- VisualStyleElement.cs
- CalendarAutomationPeer.cs
- Hash.cs
- DataKeyArray.cs
- AttributeData.cs
- GrammarBuilderBase.cs
- EntityContainerAssociationSetEnd.cs
- RevocationPoint.cs
- XMLUtil.cs
- StyleSelector.cs
- JsonGlobals.cs
- ProcessHostFactoryHelper.cs
- TreeNodeConverter.cs
- XmlComment.cs
- SessionStateSection.cs
- Domain.cs
- PolicyException.cs
- InheritanceService.cs
- DataSourceProvider.cs
- SingleResultAttribute.cs
- NativeMethods.cs
- DesignConnectionCollection.cs
- RpcAsyncResult.cs
- TextViewSelectionProcessor.cs
- CodeTryCatchFinallyStatement.cs
- Action.cs
- SingleObjectCollection.cs
- SQLBytesStorage.cs
- TreeNodeCollection.cs
- CodeStatementCollection.cs
- WindowsGraphicsWrapper.cs
- FixedPosition.cs
- MessageQueue.cs
- SystemPens.cs
- SqlDataSourceView.cs
- CacheForPrimitiveTypes.cs
- ConfigXmlAttribute.cs
- CheckedPointers.cs
- Semaphore.cs
- TemplateBuilder.cs
- Material.cs
- PipelineDeploymentState.cs
- BooleanFunctions.cs
- ListViewCommandEventArgs.cs
- CalendarDayButton.cs
- DropDownHolder.cs
- TdsValueSetter.cs
- CatalogPartChrome.cs
- ScrollChrome.cs
- SmtpAuthenticationManager.cs
- StrokeNode.cs
- DetailsViewPagerRow.cs
- Control.cs
- String.cs
- RangeValidator.cs
- MemberAccessException.cs
- Point3DValueSerializer.cs
- BufferedGenericXmlSecurityToken.cs
- RadioButtonPopupAdapter.cs
- ParameterExpression.cs
- ComponentCommands.cs
- KeyGestureValueSerializer.cs
- ContractValidationHelper.cs
- xamlnodes.cs
- ExtendedPropertyDescriptor.cs
- HttpSessionStateWrapper.cs
- OleDbRowUpdatedEvent.cs
- GcHandle.cs
- DocumentOrderQuery.cs
- RequestQueryProcessor.cs
- _SslStream.cs
- ArraySegment.cs
- Compiler.cs
- SqlGenericUtil.cs
- EdmToObjectNamespaceMap.cs
- SemaphoreSecurity.cs
- path.cs
- WindowInteractionStateTracker.cs
- MouseDevice.cs
- NeedSkipTokenVisitor.cs
- DataGrid.cs
- SoapHeaders.cs
- SQLUtility.cs
- ResourceDisplayNameAttribute.cs
- PrivilegedConfigurationManager.cs
- Int16Animation.cs
- MemoryRecordBuffer.cs
- ZipIOLocalFileBlock.cs