Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / AttributeUsageAttribute.cs / 1305376 / 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 */ [Serializable] [AttributeUsage(AttributeTargets.Class, Inherited = true)] [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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TrackingRecord.cs
- MediaContextNotificationWindow.cs
- ContextQuery.cs
- FontInfo.cs
- XmlLoader.cs
- newinstructionaction.cs
- DelegatedStream.cs
- ProcessRequestArgs.cs
- XmlAttribute.cs
- TemplateContentLoader.cs
- ScrollViewer.cs
- GZipDecoder.cs
- SelectionListDesigner.cs
- MD5.cs
- Timeline.cs
- BeginStoryboard.cs
- DetailsViewDeletedEventArgs.cs
- TextParaLineResult.cs
- GcHandle.cs
- SoapAttributes.cs
- FontDifferentiator.cs
- UrlPath.cs
- DetailsViewActionList.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- IDispatchConstantAttribute.cs
- JsonFormatWriterGenerator.cs
- ToolBarPanel.cs
- XmlElement.cs
- ModelPerspective.cs
- InheritedPropertyChangedEventArgs.cs
- TextTreeTextElementNode.cs
- HttpAsyncResult.cs
- HtmlInputButton.cs
- DbResourceAllocator.cs
- MetadataProperty.cs
- DurableInstanceContextProvider.cs
- Debugger.cs
- DbSource.cs
- ClientCultureInfo.cs
- IsolatedStorage.cs
- _FtpDataStream.cs
- FixedFlowMap.cs
- SqlGenerator.cs
- DataGridViewCellValidatingEventArgs.cs
- CursorConverter.cs
- PreparingEnlistment.cs
- QueryOperationResponseOfT.cs
- HandlerBase.cs
- XPathAxisIterator.cs
- SectionUpdates.cs
- CodePageUtils.cs
- Single.cs
- Section.cs
- DataGridTextBoxColumn.cs
- CreateRefExpr.cs
- _Win32.cs
- ISCIIEncoding.cs
- StylesEditorDialog.cs
- SmiContext.cs
- SetterBaseCollection.cs
- X509CertificateCollection.cs
- SelectionChangedEventArgs.cs
- AuditLog.cs
- NavigationWindowAutomationPeer.cs
- Unit.cs
- HtmlGenericControl.cs
- SimpleType.cs
- FileSystemInfo.cs
- SettingsPropertyCollection.cs
- ControlPaint.cs
- TemplateBuilder.cs
- MenuItemAutomationPeer.cs
- EarlyBoundInfo.cs
- DesignerForm.cs
- ImageList.cs
- ToolStripStatusLabel.cs
- NameTable.cs
- RSAPKCS1SignatureDeformatter.cs
- XpsFontSerializationService.cs
- CriticalHandle.cs
- Single.cs
- GZipUtils.cs
- ResourcePermissionBaseEntry.cs
- Form.cs
- CellParaClient.cs
- DataObjectMethodAttribute.cs
- CalculatedColumn.cs
- CompositeCollectionView.cs
- BindingListCollectionView.cs
- ExcludeFromCodeCoverageAttribute.cs
- EventProperty.cs
- FormViewRow.cs
- SafeProcessHandle.cs
- GetPolicyDetailsRequest.cs
- ImageIndexConverter.cs
- XmlObjectSerializerReadContextComplex.cs
- LocatorPart.cs
- FragmentQuery.cs
- OleDbInfoMessageEvent.cs
- UnsafeNativeMethods.cs