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
- StructuredType.cs
- PageContentAsyncResult.cs
- Convert.cs
- SerializationException.cs
- WinFormsSecurity.cs
- ParameterToken.cs
- SHA1.cs
- Marshal.cs
- PackageDigitalSignatureManager.cs
- PluralizationService.cs
- Run.cs
- QueryStringParameter.cs
- WindowsContainer.cs
- _FixedSizeReader.cs
- MarshalByRefObject.cs
- XmlChildNodes.cs
- GenericPrincipal.cs
- wgx_commands.cs
- ProviderSettingsCollection.cs
- TextWriterTraceListener.cs
- Int32CAMarshaler.cs
- HideDisabledControlAdapter.cs
- PointLight.cs
- RegexCharClass.cs
- WSSecureConversationFeb2005.cs
- DynamicRendererThreadManager.cs
- XmlValidatingReader.cs
- ellipse.cs
- ErrorStyle.cs
- NameValueCollection.cs
- Empty.cs
- MetricEntry.cs
- Oci.cs
- GlyphingCache.cs
- userdatakeys.cs
- EnumValidator.cs
- TemplateControlParser.cs
- StringTraceRecord.cs
- DbExpressionRules.cs
- TrackingProfileSerializer.cs
- Deflater.cs
- DataGridCellsPanel.cs
- StaticContext.cs
- DecimalKeyFrameCollection.cs
- PartialToken.cs
- CompiledXpathExpr.cs
- SecurityManager.cs
- SequentialUshortCollection.cs
- CLSCompliantAttribute.cs
- MatrixConverter.cs
- HtmlEmptyTagControlBuilder.cs
- ListSourceHelper.cs
- SecurityHelper.cs
- MouseOverProperty.cs
- ZipIOModeEnforcingStream.cs
- OperatingSystemVersionCheck.cs
- DataServiceRequest.cs
- FragmentQuery.cs
- DiscoveryClientChannelFactory.cs
- VectorCollection.cs
- PageHandlerFactory.cs
- PenThread.cs
- ParameterCollection.cs
- InvalidPrinterException.cs
- SiteOfOriginContainer.cs
- ToolStripDropDown.cs
- DialogWindow.cs
- SmtpLoginAuthenticationModule.cs
- NavigationWindow.cs
- ActivityIdHeader.cs
- DataProviderNameConverter.cs
- HijriCalendar.cs
- NativeRecognizer.cs
- PagesChangedEventArgs.cs
- BrushValueSerializer.cs
- RemotingConfiguration.cs
- HttpServerVarsCollection.cs
- QueueProcessor.cs
- LineGeometry.cs
- OracleInternalConnection.cs
- FontCacheLogic.cs
- PointAnimationBase.cs
- SmtpFailedRecipientException.cs
- DispatcherFrame.cs
- ProfileInfo.cs
- EventLogInternal.cs
- InvalidDataException.cs
- GreenMethods.cs
- TableRowCollection.cs
- PathTooLongException.cs
- DateTimeParse.cs
- XmlChildNodes.cs
- LogoValidationException.cs
- AppModelKnownContentFactory.cs
- BinaryObjectInfo.cs
- NaturalLanguageHyphenator.cs
- ListItemParagraph.cs
- NoClickablePointException.cs
- RemoteX509Token.cs
- VersionPair.cs