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
- Environment.cs
- ActivityDesignerResources.cs
- VoiceSynthesis.cs
- AccessText.cs
- ViewStateException.cs
- DecimalConverter.cs
- SrgsElementList.cs
- TemplatedMailWebEventProvider.cs
- EventRoute.cs
- DllNotFoundException.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- SocketSettings.cs
- InternalResources.cs
- SecurityTokenProvider.cs
- TextEndOfSegment.cs
- PropertyGrid.cs
- Cursors.cs
- PathSegment.cs
- UncommonField.cs
- AutoScrollHelper.cs
- XmlSerializerNamespaces.cs
- StateMachineWorkflow.cs
- OrderPreservingMergeHelper.cs
- ScopeCollection.cs
- DomainUpDown.cs
- DBConcurrencyException.cs
- PersonalizableTypeEntry.cs
- HeaderUtility.cs
- dtdvalidator.cs
- SelectionEditingBehavior.cs
- GlobalItem.cs
- XmlQueryTypeFactory.cs
- ListBoxItemAutomationPeer.cs
- SecurityTokenInclusionMode.cs
- ElementUtil.cs
- CompoundFileStorageReference.cs
- BufferedOutputAsyncStream.cs
- EntryIndex.cs
- RemoteX509AsymmetricSecurityKey.cs
- AsnEncodedData.cs
- ValidatedMobileControlConverter.cs
- ListenerSessionConnection.cs
- MemoryFailPoint.cs
- RoleManagerSection.cs
- AsymmetricKeyExchangeFormatter.cs
- Hashtable.cs
- CommentEmitter.cs
- DynamicPropertyHolder.cs
- XmlDataSource.cs
- Vector3DCollectionConverter.cs
- InlineObject.cs
- EventTrigger.cs
- QueryStringConverter.cs
- BasePropertyDescriptor.cs
- TableNameAttribute.cs
- RoamingStoreFile.cs
- RuntimeConfigLKG.cs
- ChtmlSelectionListAdapter.cs
- OutputCacheSection.cs
- TableLayoutColumnStyleCollection.cs
- ExpressionsCollectionConverter.cs
- IChannel.cs
- XPathNodeInfoAtom.cs
- MenuItemCollectionEditor.cs
- X500Name.cs
- StrokeNodeData.cs
- DriveNotFoundException.cs
- EnterpriseServicesHelper.cs
- SqlAggregateChecker.cs
- XsltArgumentList.cs
- BypassElementCollection.cs
- ClientSettingsStore.cs
- FontStyleConverter.cs
- Dump.cs
- GridViewUpdateEventArgs.cs
- EntityDataSourceValidationException.cs
- MatrixCamera.cs
- ShapeTypeface.cs
- CommandField.cs
- CodeCatchClauseCollection.cs
- FamilyCollection.cs
- ApplicationInfo.cs
- WizardPanel.cs
- ComboBox.cs
- DirectoryObjectSecurity.cs
- StylusPointProperties.cs
- QilIterator.cs
- ScriptingScriptResourceHandlerSection.cs
- AuthenticatingEventArgs.cs
- ReferencedType.cs
- MsmqTransportBindingElement.cs
- LinkLabelLinkClickedEvent.cs
- keycontainerpermission.cs
- EdmToObjectNamespaceMap.cs
- CloseSequence.cs
- Exceptions.cs
- PixelFormats.cs
- CellRelation.cs
- ImportedPolicyConversionContext.cs
- HttpVersion.cs