Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / AttributeUsageAttribute.cs / 1 / AttributeUsageAttribute.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: AttributeUsageAttribute
**
**
** Purpose: The class denotes how to specify the usage of an attribute
**
**
===========================================================*/
namespace System {
using System.Reflection;
/* By default, attributes are inherited and multiple attributes are not allowed */
[AttributeUsage(AttributeTargets.Class, Inherited = true),Serializable()]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class AttributeUsageAttribute : Attribute
{
internal AttributeTargets m_attributeTarget = AttributeTargets.All; // Defaults to all
internal bool m_allowMultiple = false; // Defaults to false
internal bool m_inherited = true; // Defaults to true
internal static AttributeUsageAttribute Default = new AttributeUsageAttribute(AttributeTargets.All);
//Constructors
public AttributeUsageAttribute(AttributeTargets validOn) {
m_attributeTarget = validOn;
}
internal AttributeUsageAttribute(AttributeTargets validOn, bool allowMultiple, bool inherited) {
m_attributeTarget = validOn;
m_allowMultiple = allowMultiple;
m_inherited = inherited;
}
//Properties
public AttributeTargets ValidOn
{
get{ return m_attributeTarget; }
}
public bool AllowMultiple
{
get { return m_allowMultiple; }
set { m_allowMultiple = value; }
}
public bool Inherited
{
get { return m_inherited; }
set { m_inherited = value; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ColorConverter.cs
- HwndSource.cs
- MessageFormatterConverter.cs
- TextControl.cs
- HelloMessage11.cs
- XslUrlEditor.cs
- Button.cs
- _NtlmClient.cs
- Aggregates.cs
- NavigationEventArgs.cs
- ReservationCollection.cs
- DrawingBrush.cs
- RtfToken.cs
- HMACSHA256.cs
- PngBitmapEncoder.cs
- OrderedDictionary.cs
- DriveInfo.cs
- StatusBarPanelClickEvent.cs
- DrawingBrush.cs
- XmlEntityReference.cs
- VarRefManager.cs
- ProxyHelper.cs
- ActiveXHost.cs
- HttpContext.cs
- ViewBox.cs
- InputBinding.cs
- PageAsyncTaskManager.cs
- CodeArgumentReferenceExpression.cs
- BindableTemplateBuilder.cs
- WorkBatch.cs
- AggregatePushdown.cs
- InputEventArgs.cs
- HttpDictionary.cs
- SqlXmlStorage.cs
- DataTablePropertyDescriptor.cs
- Column.cs
- XmlIgnoreAttribute.cs
- XmlRawWriter.cs
- PropertyChangeTracker.cs
- ToolboxCategoryItems.cs
- ActiveDocumentEvent.cs
- EntityCommandDefinition.cs
- MultiPartWriter.cs
- CodeArrayCreateExpression.cs
- LocalValueEnumerator.cs
- DirectoryInfo.cs
- ListSortDescriptionCollection.cs
- SynchronousChannel.cs
- OleDbSchemaGuid.cs
- SqlDataSourceCommandEventArgs.cs
- DecimalConverter.cs
- KerberosTicketHashIdentifierClause.cs
- GACIdentityPermission.cs
- MenuItemBindingCollection.cs
- HttpContext.cs
- Int64AnimationBase.cs
- IdleTimeoutMonitor.cs
- TextWriterEngine.cs
- DataServiceSaveChangesEventArgs.cs
- CookielessHelper.cs
- SQLDecimalStorage.cs
- GridEntry.cs
- WithStatement.cs
- ICspAsymmetricAlgorithm.cs
- RemoteWebConfigurationHost.cs
- SynchronizedDispatch.cs
- DiscoveryClientChannelFactory.cs
- Button.cs
- SmtpNtlmAuthenticationModule.cs
- AppSettingsExpressionBuilder.cs
- Exceptions.cs
- Merger.cs
- MessageSmuggler.cs
- AvtEvent.cs
- WorkflowCommandExtensionItem.cs
- StoreItemCollection.Loader.cs
- VectorCollectionValueSerializer.cs
- GlyphRunDrawing.cs
- EventLogPermissionEntryCollection.cs
- SignatureSummaryDialog.cs
- CorrelationManager.cs
- ScriptManager.cs
- StylusPlugInCollection.cs
- DataGridSortCommandEventArgs.cs
- ColorContextHelper.cs
- AssociationType.cs
- OracleConnectionString.cs
- AutoGeneratedFieldProperties.cs
- SmtpClient.cs
- ApplicationTrust.cs
- MethodBody.cs
- SqlMethodCallConverter.cs
- MenuItem.cs
- BinaryMessageFormatter.cs
- ContainerFilterService.cs
- SystemInformation.cs
- TemplateEditingService.cs
- ZipIORawDataFileBlock.cs
- DiscoveryDocumentReference.cs
- odbcmetadatacolumnnames.cs