Code:
/ FX-1434 / FX-1434 / 1.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
- XmlElement.cs
- SafeCryptoHandles.cs
- lengthconverter.cs
- EncodingDataItem.cs
- TimeZoneNotFoundException.cs
- HWStack.cs
- ConfigurationSectionCollection.cs
- Stacktrace.cs
- RIPEMD160.cs
- FileDialogCustomPlace.cs
- SecureConversationDriver.cs
- SafeProcessHandle.cs
- PeerEndPoint.cs
- WebBrowserSiteBase.cs
- ConfigXmlAttribute.cs
- OleDbErrorCollection.cs
- IISUnsafeMethods.cs
- CodeArrayIndexerExpression.cs
- RegistryKey.cs
- Literal.cs
- BuildProvider.cs
- SynchronizationContext.cs
- TypeInitializationException.cs
- StopStoryboard.cs
- NameValueCollection.cs
- StringInfo.cs
- FixedSOMContainer.cs
- SystemIPGlobalStatistics.cs
- MachineKeyConverter.cs
- Scripts.cs
- ObjectDataSourceStatusEventArgs.cs
- CreateUserWizardStep.cs
- PlaceHolder.cs
- ClassGenerator.cs
- TailPinnedEventArgs.cs
- ProvideValueServiceProvider.cs
- BeginStoryboard.cs
- DateRangeEvent.cs
- ScrollBarAutomationPeer.cs
- SimpleBitVector32.cs
- Debug.cs
- Span.cs
- CharacterShapingProperties.cs
- SpeechEvent.cs
- BufferModesCollection.cs
- ClickablePoint.cs
- KeyTime.cs
- ProxyElement.cs
- SoapElementAttribute.cs
- FontFamily.cs
- ReadOnlyKeyedCollection.cs
- DropShadowBitmapEffect.cs
- WpfKnownMember.cs
- StrokeIntersection.cs
- StoreItemCollection.Loader.cs
- TextDocumentView.cs
- DrawingCollection.cs
- StreamingContext.cs
- ImmutablePropertyDescriptorGridEntry.cs
- DesignerVerbCollection.cs
- AutoResetEvent.cs
- SystemIPInterfaceProperties.cs
- KeyboardNavigation.cs
- ConfigurationSectionGroupCollection.cs
- XmlSchemaCompilationSettings.cs
- BinaryObjectInfo.cs
- Internal.cs
- Camera.cs
- RandomNumberGenerator.cs
- PrintingPermission.cs
- SvcMapFile.cs
- ISAPIApplicationHost.cs
- IndexerNameAttribute.cs
- EntityDataReader.cs
- FixedSOMLineCollection.cs
- DoubleLink.cs
- UshortList2.cs
- XPathNodeIterator.cs
- FrameworkObject.cs
- DataSourceHelper.cs
- XmlWellformedWriterHelpers.cs
- TempFiles.cs
- XsdDateTime.cs
- DataTemplate.cs
- EntityStoreSchemaGenerator.cs
- ErrorHandler.cs
- KnownTypesProvider.cs
- ComponentResourceKeyConverter.cs
- PolicyStatement.cs
- WindowsFormsHostAutomationPeer.cs
- XmlSignatureProperties.cs
- ResourceExpressionBuilder.cs
- Speller.cs
- ListControlDesigner.cs
- DataGridColumnCollection.cs
- UrlMapping.cs
- FastPropertyAccessor.cs
- SqlDataSourceView.cs
- RectConverter.cs
- XhtmlTextWriter.cs