Code:
/ DotNET / DotNET / 8.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
- BamlRecordReader.cs
- HtmlAnchor.cs
- EntityDataSourceDataSelectionPanel.cs
- AsmxEndpointPickerExtension.cs
- SQLUtility.cs
- IdentityHolder.cs
- WebPartEditVerb.cs
- MemberPathMap.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- RtfNavigator.cs
- SinglePageViewer.cs
- SingletonChannelAcceptor.cs
- XmlTextReader.cs
- BulletedListEventArgs.cs
- TraceLevelStore.cs
- RegexGroup.cs
- KnownBoxes.cs
- FrameworkObject.cs
- MeasureItemEvent.cs
- XmlSchemaRedefine.cs
- HashCryptoHandle.cs
- FileDialog_Vista.cs
- UnionQueryOperator.cs
- TableStyle.cs
- DataRecord.cs
- XmlJsonReader.cs
- HttpHandlerAction.cs
- MLangCodePageEncoding.cs
- OperationCanceledException.cs
- WinHttpWebProxyFinder.cs
- Cursor.cs
- OletxEnlistment.cs
- TemplatePagerField.cs
- ResolveRequestResponseAsyncResult.cs
- XmlElementList.cs
- XpsDigitalSignature.cs
- ListViewTableRow.cs
- DEREncoding.cs
- LocalizabilityAttribute.cs
- XmlTextReader.cs
- SendKeys.cs
- ProxyWebPartManager.cs
- CodeVariableReferenceExpression.cs
- PopupControlService.cs
- Int64AnimationUsingKeyFrames.cs
- GridViewRow.cs
- Rights.cs
- StateRuntime.cs
- TextEditorMouse.cs
- ByteBufferPool.cs
- MobileRedirect.cs
- DbProviderServices.cs
- InvalidPrinterException.cs
- BufferedMessageWriter.cs
- CommentEmitter.cs
- FontWeights.cs
- BitmapEffectGroup.cs
- ContextBase.cs
- CompositeActivityTypeDescriptorProvider.cs
- ServiceHostingEnvironment.cs
- ConnectionStringsExpressionBuilder.cs
- InputLangChangeRequestEvent.cs
- HtmlTableCellCollection.cs
- FixedNode.cs
- DocumentApplicationJournalEntry.cs
- ParserContext.cs
- AliasExpr.cs
- TypeSystemProvider.cs
- WsrmMessageInfo.cs
- CounterCreationDataCollection.cs
- EditorBrowsableAttribute.cs
- MDIClient.cs
- XmlTextReaderImpl.cs
- RadioButton.cs
- CorrelationManager.cs
- StringComparer.cs
- HttpCacheVary.cs
- DataObjectFieldAttribute.cs
- TraceLog.cs
- NativeMethods.cs
- LineProperties.cs
- odbcmetadatacollectionnames.cs
- BitmapEffectGeneralTransform.cs
- Root.cs
- CacheEntry.cs
- SuppressIldasmAttribute.cs
- DataGridAddNewRow.cs
- TableColumnCollection.cs
- CodeGenerator.cs
- DefinitionUpdate.cs
- ClientProxyGenerator.cs
- UrlMappingsSection.cs
- SqlServices.cs
- ArrangedElementCollection.cs
- InvalidFilterCriteriaException.cs
- SmtpFailedRecipientsException.cs
- WebPartPersonalization.cs
- WindowsFormsHelpers.cs
- SmiMetaDataProperty.cs
- Decorator.cs