Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ObjectView.cs
- ZipIORawDataFileBlock.cs
- SafeFileHandle.cs
- DiscardableAttribute.cs
- HuffModule.cs
- RegistryPermission.cs
- ItemCollection.cs
- SqlClientWrapperSmiStream.cs
- RecognizeCompletedEventArgs.cs
- OdbcDataReader.cs
- XmlAttributeProperties.cs
- UTF7Encoding.cs
- TableLayoutStyle.cs
- Lasso.cs
- GridViewColumnCollectionChangedEventArgs.cs
- NamedObjectList.cs
- CommentEmitter.cs
- CalendarDateRangeChangingEventArgs.cs
- XmlUtil.cs
- FixedSOMTextRun.cs
- DbConnectionStringBuilder.cs
- DBConnectionString.cs
- DataListGeneralPage.cs
- LoggedException.cs
- UserMapPath.cs
- ObjectToIdCache.cs
- EnumerationRangeValidationUtil.cs
- MatrixUtil.cs
- AddInDeploymentState.cs
- DataTableExtensions.cs
- XmlSchemaProviderAttribute.cs
- ComponentEditorForm.cs
- DataColumnPropertyDescriptor.cs
- Literal.cs
- ReaderContextStackData.cs
- LineServicesCallbacks.cs
- printdlgexmarshaler.cs
- EntityDataSourceContainerNameItem.cs
- PropertyGeneratedEventArgs.cs
- DATA_BLOB.cs
- KeyPressEvent.cs
- SafeProcessHandle.cs
- DependencyPropertyHelper.cs
- ShutDownListener.cs
- MonitoringDescriptionAttribute.cs
- ADMembershipProvider.cs
- OrderPreservingPipeliningSpoolingTask.cs
- AsyncResult.cs
- DataTemplateKey.cs
- InfoCardBaseException.cs
- UInt32Converter.cs
- CalendarTable.cs
- DesignerProperties.cs
- AppSettingsExpressionBuilder.cs
- TraceSwitch.cs
- Lease.cs
- UseAttributeSetsAction.cs
- View.cs
- Model3D.cs
- SqlBuilder.cs
- Int64Animation.cs
- WindowsSysHeader.cs
- TreeNodeBindingCollection.cs
- InputScope.cs
- TypedTableBase.cs
- AmbientValueAttribute.cs
- ListDataHelper.cs
- MaskInputRejectedEventArgs.cs
- DataSourceConverter.cs
- DataGridItemEventArgs.cs
- CachedBitmap.cs
- Profiler.cs
- PageContent.cs
- DbDataReader.cs
- ExpressionBindings.cs
- graph.cs
- XmlSchemaSimpleTypeRestriction.cs
- QueryTaskGroupState.cs
- CodeGeneratorOptions.cs
- DbConnectionStringCommon.cs
- DataGridPageChangedEventArgs.cs
- CompilerWrapper.cs
- RequestSecurityTokenSerializer.cs
- NativeActivityAbortContext.cs
- MessageHeaderException.cs
- IncrementalHitTester.cs
- DetailsViewInsertEventArgs.cs
- UserControlBuildProvider.cs
- BinaryQueryOperator.cs
- ProfileSection.cs
- XmlSchemaRedefine.cs
- StatusBar.cs
- WebBrowser.cs
- TemplatedWizardStep.cs
- DataGridViewRowStateChangedEventArgs.cs
- FontInfo.cs
- TextSelectionProcessor.cs
- WS2007FederationHttpBindingCollectionElement.cs
- FtpRequestCacheValidator.cs
- StorageInfo.cs