Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ExpressionVisitor.cs
- PersonalizableTypeEntry.cs
- Win32Exception.cs
- UserControlAutomationPeer.cs
- SettingsPropertyIsReadOnlyException.cs
- XmlUtil.cs
- GridViewCancelEditEventArgs.cs
- EncodingTable.cs
- ViewgenContext.cs
- SqlRemoveConstantOrderBy.cs
- HybridDictionary.cs
- COM2ICategorizePropertiesHandler.cs
- PropertyOverridesTypeEditor.cs
- DataGridViewAccessibleObject.cs
- MimeFormReflector.cs
- NetworkStream.cs
- TextParagraphCache.cs
- Bezier.cs
- RegexWriter.cs
- connectionpool.cs
- X509SecurityTokenAuthenticator.cs
- AsyncResult.cs
- StreamGeometry.cs
- TemplateParser.cs
- SqlMethodCallConverter.cs
- XmlFormatExtensionPrefixAttribute.cs
- RawStylusInputCustomData.cs
- UnsafeNativeMethods.cs
- AndCondition.cs
- EntityDataSourceDataSelectionPanel.cs
- RowCache.cs
- AccessedThroughPropertyAttribute.cs
- ConnectionsZone.cs
- ExpressionParser.cs
- FusionWrap.cs
- HttpContext.cs
- FileLogRecordHeader.cs
- ISFTagAndGuidCache.cs
- TemplateLookupAction.cs
- ToolStripDropDownClosingEventArgs.cs
- Enum.cs
- TypeDescriptor.cs
- JoinGraph.cs
- WebZone.cs
- ApplicationServicesHostFactory.cs
- CatalogZoneBase.cs
- ExpressionHelper.cs
- PropagatorResult.cs
- TreeView.cs
- WCFBuildProvider.cs
- StringBlob.cs
- StdValidatorsAndConverters.cs
- PenThread.cs
- GrammarBuilderRuleRef.cs
- COM2Enum.cs
- ImageInfo.cs
- IsolatedStoragePermission.cs
- ExchangeUtilities.cs
- ClientSideProviderDescription.cs
- XmlnsCache.cs
- ToolStripRenderer.cs
- LookupNode.cs
- ProfileProvider.cs
- SiteMap.cs
- DockProviderWrapper.cs
- SafeHandles.cs
- AsyncDataRequest.cs
- BatchWriter.cs
- NetSectionGroup.cs
- XMLSyntaxException.cs
- Bold.cs
- CodeTypeParameterCollection.cs
- XmlSchemaObjectCollection.cs
- DataControlFieldCollection.cs
- VectorKeyFrameCollection.cs
- RestClientProxyHandler.cs
- HandlerBase.cs
- Vector3DValueSerializer.cs
- TreeViewAutomationPeer.cs
- TextEffect.cs
- UnsafeNativeMethods.cs
- ChildrenQuery.cs
- SiteMapNodeItem.cs
- KerberosReceiverSecurityToken.cs
- RectAnimation.cs
- ForeignKeyFactory.cs
- ExpandCollapseIsCheckedConverter.cs
- GuidConverter.cs
- EventMap.cs
- Vector.cs
- RuleElement.cs
- Oci.cs
- SchemaTableColumn.cs
- AutomationPropertyChangedEventArgs.cs
- CustomAttributeBuilder.cs
- FontStretches.cs
- DataGridCommandEventArgs.cs
- IgnoreFlushAndCloseStream.cs
- DataObjectSettingDataEventArgs.cs
- RuntimeArgumentHandle.cs