Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Converter.cs
- GPRECTF.cs
- ProxyElement.cs
- Rect.cs
- Html32TextWriter.cs
- TcpAppDomainProtocolHandler.cs
- ActivityUtilities.cs
- LogicalExpr.cs
- InfocardClientCredentials.cs
- ThemeDictionaryExtension.cs
- X500Name.cs
- SqlReorderer.cs
- RadioButtonBaseAdapter.cs
- PersonalizationProvider.cs
- HwndProxyElementProvider.cs
- TextDecorationLocationValidation.cs
- HttpCachePolicyElement.cs
- InteropBitmapSource.cs
- SafeNativeMethods.cs
- FormsAuthenticationEventArgs.cs
- VBCodeProvider.cs
- InkCanvasSelectionAdorner.cs
- ItemsControlAutomationPeer.cs
- IApplicationTrustManager.cs
- StylusLogic.cs
- BindingExpressionBase.cs
- MailMessageEventArgs.cs
- ComponentDispatcherThread.cs
- Durable.cs
- PersonalizationState.cs
- MenuItem.cs
- DependencyPropertyKind.cs
- TextBoxRenderer.cs
- RowsCopiedEventArgs.cs
- CryptoProvider.cs
- HealthMonitoringSectionHelper.cs
- QuaternionValueSerializer.cs
- Quaternion.cs
- Stroke2.cs
- FlowPosition.cs
- LinqDataSource.cs
- SqlWorkflowInstanceStore.cs
- ListBindingConverter.cs
- SByte.cs
- SingleObjectCollection.cs
- ControlCodeDomSerializer.cs
- NetCodeGroup.cs
- _FtpDataStream.cs
- OwnerDrawPropertyBag.cs
- XmlWriterSettings.cs
- TypedTableBaseExtensions.cs
- MergeLocalizationDirectives.cs
- UInt16Storage.cs
- XmlSchemaObjectCollection.cs
- HtmlTableCellCollection.cs
- DataSourceNameHandler.cs
- QueryCorrelationInitializer.cs
- List.cs
- Material.cs
- BamlLocalizableResource.cs
- CodeDOMProvider.cs
- LogFlushAsyncResult.cs
- ZeroOpNode.cs
- LogArchiveSnapshot.cs
- FontSourceCollection.cs
- XmlEntity.cs
- XsdCachingReader.cs
- RegexCode.cs
- EntityContainer.cs
- Pkcs9Attribute.cs
- NextPreviousPagerField.cs
- Memoizer.cs
- XmlAutoDetectWriter.cs
- AutomationPatternInfo.cs
- FileRecordSequenceHelper.cs
- AnnotationAdorner.cs
- TrackingCondition.cs
- dataprotectionpermissionattribute.cs
- IDictionary.cs
- WebPartMinimizeVerb.cs
- FrameworkElement.cs
- SimpleFileLog.cs
- SchemaAttDef.cs
- DataExchangeServiceBinder.cs
- _NTAuthentication.cs
- RewritingSimplifier.cs
- IDictionary.cs
- EntityException.cs
- SettingsPropertyValue.cs
- PerfService.cs
- ContentPosition.cs
- XmlLanguage.cs
- SingleBodyParameterMessageFormatter.cs
- SchemaImporterExtension.cs
- DataMemberFieldConverter.cs
- Parsers.cs
- TableLayoutPanel.cs
- DiscoveryRequestHandler.cs
- _SafeNetHandles.cs
- WorkflowApplicationException.cs