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
- DecimalStorage.cs
- PolicyLevel.cs
- CellParagraph.cs
- DataGridRowClipboardEventArgs.cs
- DataSourceControlBuilder.cs
- XmlNamedNodeMap.cs
- ServicePerformanceCounters.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- EncoderExceptionFallback.cs
- URL.cs
- AddingNewEventArgs.cs
- IDispatchConstantAttribute.cs
- BasicHttpSecurity.cs
- SqlConnection.cs
- TreeViewImageKeyConverter.cs
- BinarySecretKeyIdentifierClause.cs
- ObjectListItem.cs
- DrawingState.cs
- RowParagraph.cs
- ModelPerspective.cs
- ReadOnlyHierarchicalDataSourceView.cs
- StrokeSerializer.cs
- InputReportEventArgs.cs
- XmlTextReaderImpl.cs
- PersonalizationAdministration.cs
- EntityDesignerBuildProvider.cs
- DbConnectionPoolCounters.cs
- XmlSchemaExporter.cs
- ReadOnlyTernaryTree.cs
- ProfileGroupSettings.cs
- Image.cs
- CmsInterop.cs
- InvalidDocumentContentsException.cs
- Image.cs
- DataBoundControl.cs
- BitmapPalette.cs
- BindingNavigator.cs
- HttpContext.cs
- SqlTopReducer.cs
- storepermission.cs
- EpmContentDeSerializerBase.cs
- Camera.cs
- ImageUrlEditor.cs
- RelatedView.cs
- ZipIOBlockManager.cs
- EnvelopedPkcs7.cs
- ExcCanonicalXml.cs
- AttributeData.cs
- ObjectNavigationPropertyMapping.cs
- AssociatedControlConverter.cs
- ComponentDispatcherThread.cs
- TypeInitializationException.cs
- ClientRuntimeConfig.cs
- Int16Storage.cs
- ToolStripTextBox.cs
- COM2PropertyPageUITypeConverter.cs
- _TransmitFileOverlappedAsyncResult.cs
- HostProtectionException.cs
- TypeDependencyAttribute.cs
- WebWorkflowRole.cs
- StylusButton.cs
- LoadItemsEventArgs.cs
- ArglessEventHandlerProxy.cs
- QueryOperatorEnumerator.cs
- CodeMethodInvokeExpression.cs
- PeerPresenceInfo.cs
- XmlWriterSettings.cs
- Parser.cs
- DataMisalignedException.cs
- DataColumnPropertyDescriptor.cs
- DecimalConstantAttribute.cs
- Mutex.cs
- PopupRoot.cs
- HttpStreams.cs
- DataControlLinkButton.cs
- XPathNodePointer.cs
- CompareInfo.cs
- EdmToObjectNamespaceMap.cs
- DefaultValueTypeConverter.cs
- TrackPointCollection.cs
- DateTimeFormat.cs
- DefaultWorkflowLoaderService.cs
- DataServiceQueryException.cs
- Lookup.cs
- PerformanceCounterPermissionAttribute.cs
- NetworkStream.cs
- CompilerErrorCollection.cs
- SynchronizationLockException.cs
- WorkItem.cs
- CompilationRelaxations.cs
- MonitorWrapper.cs
- ServiceContractListItem.cs
- MimeParameter.cs
- EntityParameter.cs
- MdiWindowListStrip.cs
- PreservationFileWriter.cs
- WorkflowViewElement.cs
- HtmlMeta.cs
- indexingfiltermarshaler.cs
- Path.cs