Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeSubDirectoriesCollection.cs
- TypeProvider.cs
- OperatingSystem.cs
- MsmqProcessProtocolHandler.cs
- CurrencyWrapper.cs
- MsmqProcessProtocolHandler.cs
- DecimalConstantAttribute.cs
- JsonReaderWriterFactory.cs
- XmlNamespaceMapping.cs
- InstanceOwnerQueryResult.cs
- PowerModeChangedEventArgs.cs
- CfgRule.cs
- LabelAutomationPeer.cs
- AutoScrollHelper.cs
- SocketAddress.cs
- CompareInfo.cs
- DoubleStorage.cs
- AvTrace.cs
- AudioFormatConverter.cs
- FocusChangedEventArgs.cs
- Repeater.cs
- ApplicationManager.cs
- UrlMappingsModule.cs
- MaxSessionCountExceededException.cs
- EventLogEntryCollection.cs
- KeyValueConfigurationElement.cs
- DPTypeDescriptorContext.cs
- PersistenceTypeAttribute.cs
- ServiceDescriptions.cs
- DataPagerCommandEventArgs.cs
- DataKey.cs
- MenuItemBindingCollection.cs
- Accessors.cs
- ToolStripButton.cs
- StatusBarItem.cs
- recordstatefactory.cs
- GridLengthConverter.cs
- SqlCommandSet.cs
- XmlValidatingReaderImpl.cs
- PermissionToken.cs
- RoleManagerEventArgs.cs
- ListViewItemMouseHoverEvent.cs
- StaticTextPointer.cs
- ErrorTableItemStyle.cs
- DynamicDataManager.cs
- PrintPreviewGraphics.cs
- TableDetailsRow.cs
- DictionarySectionHandler.cs
- BaseAsyncResult.cs
- UnsafeNativeMethods.cs
- QueryConverter.cs
- ObjectStateEntryDbDataRecord.cs
- SimpleBitVector32.cs
- IncrementalReadDecoders.cs
- AbstractSvcMapFileLoader.cs
- PersonalizableAttribute.cs
- ReadOnlyActivityGlyph.cs
- RoleService.cs
- ModuleBuilderData.cs
- ZipPackage.cs
- CommandValueSerializer.cs
- DocumentViewer.cs
- XamlBrushSerializer.cs
- BindValidator.cs
- FilterQueryOptionExpression.cs
- COM2ExtendedUITypeEditor.cs
- MasterPageCodeDomTreeGenerator.cs
- CollectionContainer.cs
- AnnotationStore.cs
- EraserBehavior.cs
- FontNamesConverter.cs
- SqlDataSourceSelectingEventArgs.cs
- Location.cs
- DateTimeValueSerializerContext.cs
- shaperfactory.cs
- ExtensionWindow.cs
- ValidatingReaderNodeData.cs
- PropertySet.cs
- DebugView.cs
- MonitorWrapper.cs
- XmlWellformedWriter.cs
- UInt32Storage.cs
- CustomError.cs
- SqlCommandSet.cs
- ObjectCache.cs
- PlaceHolder.cs
- QueryStringParameter.cs
- TransformerInfo.cs
- SQLBinaryStorage.cs
- FixedSOMTextRun.cs
- HatchBrush.cs
- CommandManager.cs
- Rotation3D.cs
- XslUrlEditor.cs
- Soap12ProtocolReflector.cs
- TextFormatterContext.cs
- coordinator.cs
- PhonemeEventArgs.cs
- CompilerTypeWithParams.cs
- DependentList.cs