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
- XmlSerializerOperationFormatter.cs
- TableItemStyle.cs
- ConstraintCollection.cs
- BatchParser.cs
- DataGridViewSelectedCellCollection.cs
- X509SecurityTokenAuthenticator.cs
- InstanceDataCollectionCollection.cs
- ValidationSummary.cs
- CodeCompileUnit.cs
- ThreadSafeMessageFilterTable.cs
- MergeLocalizationDirectives.cs
- ErrorEventArgs.cs
- Encoder.cs
- UrlUtility.cs
- Image.cs
- Console.cs
- SortedDictionary.cs
- DbConnectionHelper.cs
- TCPListener.cs
- EngineSite.cs
- DataTable.cs
- HttpFileCollection.cs
- HandlerElementCollection.cs
- ObjectView.cs
- DataSourceHelper.cs
- ListManagerBindingsCollection.cs
- NotFiniteNumberException.cs
- WindowsIPAddress.cs
- FontUnit.cs
- RoleManagerSection.cs
- ProxyElement.cs
- ObjectSecurity.cs
- DataControlFieldCell.cs
- SerializationEventsCache.cs
- sqlmetadatafactory.cs
- DecimalConverter.cs
- StickyNoteContentControl.cs
- ForwardPositionQuery.cs
- SiteMapNode.cs
- CharUnicodeInfo.cs
- ParseNumbers.cs
- CmsInterop.cs
- ADMembershipUser.cs
- SqlAggregateChecker.cs
- PolyBezierSegment.cs
- LongMinMaxAggregationOperator.cs
- EntityStoreSchemaGenerator.cs
- XmlILTrace.cs
- Stack.cs
- VirtualPathUtility.cs
- TemplateBindingExpression.cs
- ModulesEntry.cs
- PolyBezierSegment.cs
- ScriptControl.cs
- CreateUserWizardDesigner.cs
- AttachedProperty.cs
- OdbcReferenceCollection.cs
- XmlElementList.cs
- ContentIterators.cs
- ScrollChangedEventArgs.cs
- SortableBindingList.cs
- linebase.cs
- SimpleNameService.cs
- SiteMapDataSourceView.cs
- ToolStripGrip.cs
- PagesChangedEventArgs.cs
- CompoundFileIOPermission.cs
- ClosureBinding.cs
- EdmComplexPropertyAttribute.cs
- DrawingState.cs
- CapabilitiesAssignment.cs
- AuthenticationServiceManager.cs
- MsmqProcessProtocolHandler.cs
- ErrorHandlerModule.cs
- ImageButton.cs
- ExeContext.cs
- TreeNodeStyleCollection.cs
- hwndwrapper.cs
- Attributes.cs
- SmtpMail.cs
- ValidationResult.cs
- RemoteWebConfigurationHostStream.cs
- Config.cs
- ControllableStoryboardAction.cs
- CommonDialog.cs
- NativeWindow.cs
- IisNotInstalledException.cs
- ToolStripHighContrastRenderer.cs
- SchemaNamespaceManager.cs
- MoveSizeWinEventHandler.cs
- ErrorStyle.cs
- XslNumber.cs
- WebPartConnectionsCancelVerb.cs
- Image.cs
- BackgroundWorker.cs
- SystemEvents.cs
- KeyManager.cs
- ByteStack.cs
- SqlUtils.cs
- ComplexTypeEmitter.cs