Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RemoveFromCollection.cs
- RegexGroup.cs
- AspNetHostingPermission.cs
- DataGridViewLinkColumn.cs
- DmlSqlGenerator.cs
- ValidatorCollection.cs
- ThicknessAnimation.cs
- FontStyles.cs
- DataDocumentXPathNavigator.cs
- TdsParameterSetter.cs
- ProfileModule.cs
- XPathNodeInfoAtom.cs
- OrderingExpression.cs
- TimeIntervalCollection.cs
- CodeCatchClause.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- X509Certificate.cs
- ResXResourceSet.cs
- ActivityBindForm.Designer.cs
- ListInitExpression.cs
- ContentPathSegment.cs
- MdImport.cs
- ObjectDataSourceMethodEventArgs.cs
- ToolStripContentPanelRenderEventArgs.cs
- RemoveStoryboard.cs
- InfiniteIntConverter.cs
- RotateTransform.cs
- DataGridViewColumn.cs
- TableCellAutomationPeer.cs
- ImageCollectionEditor.cs
- CharStorage.cs
- MetadataPropertyCollection.cs
- RequestResizeEvent.cs
- InspectionWorker.cs
- ToolStripDesignerAvailabilityAttribute.cs
- WmpBitmapDecoder.cs
- InternalsVisibleToAttribute.cs
- CodeAttributeDeclaration.cs
- DocumentOrderQuery.cs
- FixedTextSelectionProcessor.cs
- AsyncPostBackErrorEventArgs.cs
- GatewayDefinition.cs
- TextEndOfLine.cs
- ComContractElement.cs
- ToggleButton.cs
- QueryExpr.cs
- DockPattern.cs
- ProgressBarBrushConverter.cs
- BaseHashHelper.cs
- BuildProviderCollection.cs
- Triplet.cs
- EntityDataSourceValidationException.cs
- WorkflowTransactionService.cs
- DataStreamFromComStream.cs
- EdgeModeValidation.cs
- HTMLTextWriter.cs
- SafeProcessHandle.cs
- UInt64Storage.cs
- WhileDesigner.cs
- Object.cs
- TileBrush.cs
- ItemsChangedEventArgs.cs
- SqlDataSourceCommandEventArgs.cs
- EmptyEnumerable.cs
- SoapIncludeAttribute.cs
- ObjectListShowCommandsEventArgs.cs
- DrawingContextWalker.cs
- ModelItem.cs
- ServiceBuildProvider.cs
- CustomError.cs
- HostedTransportConfigurationManager.cs
- FormViewRow.cs
- RadioButtonList.cs
- InitializerFacet.cs
- ExpressionBindings.cs
- RegisteredExpandoAttribute.cs
- SocketSettings.cs
- DataControlFieldHeaderCell.cs
- XComponentModel.cs
- CheckBox.cs
- CompilerLocalReference.cs
- WebPartRestoreVerb.cs
- TextCollapsingProperties.cs
- RegexFCD.cs
- EventLogPermissionEntryCollection.cs
- PublisherMembershipCondition.cs
- RightsManagementPermission.cs
- IISMapPath.cs
- DLinqAssociationProvider.cs
- TagPrefixInfo.cs
- PersistenceProviderElement.cs
- AtomServiceDocumentSerializer.cs
- AnnotationHighlightLayer.cs
- FixedDocument.cs
- UTF8Encoding.cs
- NamedPipeChannelFactory.cs
- ProgressBar.cs
- AliasedSlot.cs
- LinqDataView.cs
- MdImport.cs