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
- ByteStack.cs
- BindToObject.cs
- ProfileGroupSettingsCollection.cs
- Rect3D.cs
- DataGridViewComboBoxColumn.cs
- DataGridViewUtilities.cs
- Rect.cs
- ProjectedSlot.cs
- IncrementalHitTester.cs
- SpAudioStreamWrapper.cs
- ToolboxComponentsCreatedEventArgs.cs
- ListViewItemSelectionChangedEvent.cs
- ParameterCollectionEditorForm.cs
- ImpersonateTokenRef.cs
- DataKey.cs
- StoreContentChangedEventArgs.cs
- SqlServer2KCompatibilityAnnotation.cs
- AspNetRouteServiceHttpHandler.cs
- HierarchicalDataSourceConverter.cs
- AddressHeaderCollection.cs
- NavigationProperty.cs
- ImageCodecInfoPrivate.cs
- Util.cs
- OverflowException.cs
- HitTestWithGeometryDrawingContextWalker.cs
- MetadataCache.cs
- ListChangedEventArgs.cs
- NonVisualControlAttribute.cs
- GridLengthConverter.cs
- HtmlContainerControl.cs
- VariableAction.cs
- ExceptionUtility.cs
- XamlTypeMapper.cs
- FileIOPermission.cs
- QilXmlReader.cs
- OutputCacheProfile.cs
- WebServiceErrorEvent.cs
- ColumnWidthChangingEvent.cs
- NodeFunctions.cs
- ItemCollection.cs
- ResourceSetExpression.cs
- HttpListenerContext.cs
- MappedMetaModel.cs
- PrivateFontCollection.cs
- CreateParams.cs
- TextFormatterImp.cs
- TaiwanCalendar.cs
- DataSet.cs
- Menu.cs
- ValidationManager.cs
- NodeFunctions.cs
- MediaPlayerState.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SwitchElementsCollection.cs
- ConnectorSelectionGlyph.cs
- SiteMapSection.cs
- XPathQilFactory.cs
- SingleKeyFrameCollection.cs
- CheckedListBox.cs
- AppDomainFactory.cs
- AnnotationMap.cs
- NameTable.cs
- DbDataReader.cs
- ServerValidateEventArgs.cs
- SqlGatherConsumedAliases.cs
- MouseActionConverter.cs
- SmtpDateTime.cs
- InkCanvasSelectionAdorner.cs
- JapaneseCalendar.cs
- SpellCheck.cs
- EditingCoordinator.cs
- EarlyBoundInfo.cs
- WebBrowserNavigatedEventHandler.cs
- MediaTimeline.cs
- PropertyGridCommands.cs
- WebBrowserDocumentCompletedEventHandler.cs
- ClassHandlersStore.cs
- HttpCacheParams.cs
- ScriptControlManager.cs
- SimpleTypeResolver.cs
- MemoryPressure.cs
- Main.cs
- SiteMapHierarchicalDataSourceView.cs
- ProcessInfo.cs
- TableLayoutPanelResizeGlyph.cs
- SimpleRecyclingCache.cs
- LayoutSettings.cs
- ToolTip.cs
- HttpsChannelFactory.cs
- ResourceAttributes.cs
- Rect3DValueSerializer.cs
- ServiceProviders.cs
- TextViewSelectionProcessor.cs
- ProfilePropertySettings.cs
- ImageAnimator.cs
- String.cs
- SendAgentStatusRequest.cs
- BlurBitmapEffect.cs
- WebBrowserEvent.cs
- AssemblyBuilder.cs