Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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; }
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NumberFormatter.cs
- localization.cs
- ObjectDataSourceEventArgs.cs
- TripleDESCryptoServiceProvider.cs
- PassportAuthenticationEventArgs.cs
- PropertyRef.cs
- NavigationProgressEventArgs.cs
- HostingEnvironmentWrapper.cs
- TdsParser.cs
- NavigationPropertyEmitter.cs
- SystemDiagnosticsSection.cs
- DesignTimeVisibleAttribute.cs
- XamlVector3DCollectionSerializer.cs
- XmlHierarchyData.cs
- BulletedListEventArgs.cs
- DbConnectionInternal.cs
- CompiledAction.cs
- FormViewInsertedEventArgs.cs
- TypeDescriptionProvider.cs
- ContentTextAutomationPeer.cs
- ImageDrawing.cs
- GlyphingCache.cs
- ImmComposition.cs
- CallTemplateAction.cs
- ChangeInterceptorAttribute.cs
- ActivityScheduledQuery.cs
- SqlDataSourceView.cs
- SQLSingle.cs
- MethodBody.cs
- SoapInteropTypes.cs
- GPRECTF.cs
- WriteableOnDemandStream.cs
- BoundsDrawingContextWalker.cs
- ScriptReferenceEventArgs.cs
- WsatTransactionHeader.cs
- PopOutPanel.cs
- SymmetricKey.cs
- TextRange.cs
- FixedSOMImage.cs
- ClientConvert.cs
- InputBuffer.cs
- ServiceContractViewControl.Designer.cs
- InputChannelAcceptor.cs
- ObjectListCommand.cs
- OleDbConnectionFactory.cs
- StringResourceManager.cs
- RegisteredScript.cs
- BuildManagerHost.cs
- KeyGestureValueSerializer.cs
- TypeForwardedFromAttribute.cs
- SemanticBasicElement.cs
- DataComponentGenerator.cs
- FacetValueContainer.cs
- XmlDataImplementation.cs
- SecureUICommand.cs
- DesignTimeTemplateParser.cs
- XmlNullResolver.cs
- NewItemsContextMenuStrip.cs
- AuthenticationManager.cs
- StylusPoint.cs
- PointAnimationUsingKeyFrames.cs
- EncodingStreamWrapper.cs
- CombinedGeometry.cs
- IntSecurity.cs
- AsymmetricKeyExchangeDeformatter.cs
- Graphics.cs
- KeyGestureConverter.cs
- ContextMarshalException.cs
- ConfigurationSettings.cs
- ColumnTypeConverter.cs
- ValidatorUtils.cs
- SafeWaitHandle.cs
- TemplateBindingExtension.cs
- TableLayoutStyle.cs
- DataPagerFieldCollection.cs
- DesignerVerbCollection.cs
- ColumnCollection.cs
- DataTableMappingCollection.cs
- XmlDataLoader.cs
- SourceItem.cs
- MetadataSerializer.cs
- ConfigXmlDocument.cs
- FixUpCollection.cs
- HtmlTable.cs
- DataSourceControl.cs
- Color.cs
- SiteMapHierarchicalDataSourceView.cs
- EdmComplexTypeAttribute.cs
- ImmutablePropertyDescriptorGridEntry.cs
- ExceptionHelpers.cs
- TransmissionStrategy.cs
- OdbcParameter.cs
- NetworkCredential.cs
- ChannelBinding.cs
- WebPartHeaderCloseVerb.cs
- ColorConvertedBitmapExtension.cs
- PKCS1MaskGenerationMethod.cs
- NativeMethods.cs
- BamlTreeUpdater.cs
- DurableServiceAttribute.cs