Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // // ==--== /*============================================================ ** ** 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InteropAutomationProvider.cs
- ToolStripSystemRenderer.cs
- GlyphShapingProperties.cs
- PatternMatcher.cs
- HierarchicalDataSourceConverter.cs
- ReflectTypeDescriptionProvider.cs
- DropAnimation.xaml.cs
- QueryTaskGroupState.cs
- Pair.cs
- TimeSpanStorage.cs
- MsmqInputMessagePool.cs
- MatrixKeyFrameCollection.cs
- MarginsConverter.cs
- StoreAnnotationsMap.cs
- HashCodeCombiner.cs
- WriteableOnDemandPackagePart.cs
- DefaultObjectMappingItemCollection.cs
- ObjectNotFoundException.cs
- HttpModuleAction.cs
- DecoderFallbackWithFailureFlag.cs
- WindowsAuthenticationModule.cs
- SuppressMessageAttribute.cs
- BlobPersonalizationState.cs
- CollectionChangeEventArgs.cs
- ActivityMarkupSerializationProvider.cs
- GenericNameHandler.cs
- ReturnEventArgs.cs
- DataObjectEventArgs.cs
- SeparatorAutomationPeer.cs
- QueryContinueDragEvent.cs
- WinEventTracker.cs
- PersonalizationProvider.cs
- CreateUserWizard.cs
- XmlSchemaAnnotated.cs
- WindowsFormsHost.cs
- FormatConvertedBitmap.cs
- SimpleColumnProvider.cs
- TextChangedEventArgs.cs
- FormatPage.cs
- WebPartDesigner.cs
- Converter.cs
- TextTreeFixupNode.cs
- DataTrigger.cs
- tooltip.cs
- ScriptingProfileServiceSection.cs
- SocketManager.cs
- Brush.cs
- VirtualizingPanel.cs
- GenerateHelper.cs
- CachedPathData.cs
- GeneralTransform.cs
- backend.cs
- DataGridViewAddColumnDialog.cs
- BaseParser.cs
- CurrencyManager.cs
- SmtpNegotiateAuthenticationModule.cs
- XdrBuilder.cs
- LicenseException.cs
- GeneralTransform3D.cs
- DataGridRow.cs
- Simplifier.cs
- SynchronizationValidator.cs
- MediaContextNotificationWindow.cs
- SwitchElementsCollection.cs
- ToggleProviderWrapper.cs
- DrawingContextWalker.cs
- MinMaxParagraphWidth.cs
- PickDesigner.xaml.cs
- XhtmlBasicPhoneCallAdapter.cs
- MetadataItemEmitter.cs
- AnnotationAdorner.cs
- Int32Animation.cs
- WorkflowFileItem.cs
- DrawingGroup.cs
- DownloadProgressEventArgs.cs
- FilterEventArgs.cs
- RegisteredDisposeScript.cs
- LocationSectionRecord.cs
- CorruptingExceptionCommon.cs
- ClientBuildManager.cs
- WebPartTracker.cs
- SQlBooleanStorage.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- XmlQueryContext.cs
- SystemPens.cs
- Size3DValueSerializer.cs
- Interop.cs
- JpegBitmapEncoder.cs
- QilInvokeEarlyBound.cs
- DataGridViewTextBoxColumn.cs
- MimeTypeMapper.cs
- WebBrowser.cs
- BasicHttpSecurityMode.cs
- StateDesigner.TransitionInfo.cs
- Symbol.cs
- XmlHierarchyData.cs
- SessionConnectionReader.cs
- OdbcFactory.cs
- Validator.cs
- NetworkAddressChange.cs