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
- COM2ICategorizePropertiesHandler.cs
- ClickablePoint.cs
- StringConcat.cs
- sqlser.cs
- XComponentModel.cs
- FormViewCommandEventArgs.cs
- XsltSettings.cs
- DataGridViewComboBoxColumn.cs
- TreeNode.cs
- Link.cs
- WindowsIdentity.cs
- PrePrepareMethodAttribute.cs
- ConfigXmlCDataSection.cs
- RecognitionEventArgs.cs
- SymLanguageVendor.cs
- TreeBuilder.cs
- UnsafeNativeMethods.cs
- WebPartEditorOkVerb.cs
- TabletDeviceInfo.cs
- DrawingGroup.cs
- RoleGroupCollectionEditor.cs
- InvokeSchedule.cs
- XPathExpr.cs
- AutomationElement.cs
- ValueTypeFixupInfo.cs
- PageContentCollection.cs
- MessageContractImporter.cs
- StrokeCollection.cs
- TypeUtil.cs
- StickyNote.cs
- ContainerActivationHelper.cs
- StateItem.cs
- LineGeometry.cs
- XmlBinaryReader.cs
- FixedSOMElement.cs
- Sentence.cs
- ToolStripSplitStackLayout.cs
- FixedTextSelectionProcessor.cs
- MultiPageTextView.cs
- TriggerActionCollection.cs
- DoubleKeyFrameCollection.cs
- WebPageTraceListener.cs
- PrimaryKeyTypeConverter.cs
- WindowsListViewGroupHelper.cs
- ProtocolProfile.cs
- Int32Converter.cs
- RootProfilePropertySettingsCollection.cs
- ISessionStateStore.cs
- SymDocumentType.cs
- SafeNativeMethods.cs
- MenuRenderer.cs
- GlyphingCache.cs
- TextEditorCopyPaste.cs
- MonitoringDescriptionAttribute.cs
- EditBehavior.cs
- ConfigurationErrorsException.cs
- ComponentDispatcherThread.cs
- Parameter.cs
- StreamReader.cs
- PerformanceCounterPermissionEntry.cs
- EventsTab.cs
- IEnumerable.cs
- ProfileParameter.cs
- MessageSmuggler.cs
- BinaryFormatter.cs
- RijndaelManagedTransform.cs
- JsonGlobals.cs
- UInt64Storage.cs
- WebSysDescriptionAttribute.cs
- FunctionQuery.cs
- ExpressionLink.cs
- AppSettingsReader.cs
- PageRequestManager.cs
- EntityException.cs
- LocalizationComments.cs
- ThreadInterruptedException.cs
- ComponentDesigner.cs
- DrawingServices.cs
- SpellerInterop.cs
- QuaternionRotation3D.cs
- PermissionSetEnumerator.cs
- ThreadExceptionEvent.cs
- ObsoleteAttribute.cs
- WsatConfiguration.cs
- TypeCollectionDesigner.xaml.cs
- EmitterCache.cs
- CfgParser.cs
- Assembly.cs
- RowVisual.cs
- SplitContainer.cs
- AdRotator.cs
- InputScopeConverter.cs
- GridViewCancelEditEventArgs.cs
- XLinq.cs
- ImageFormatConverter.cs
- RankException.cs
- shaperfactoryquerycacheentry.cs
- WebPartsPersonalization.cs
- SoapClientMessage.cs
- Font.cs