Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- InvalidDataException.cs
- XPathNodeIterator.cs
- DoWorkEventArgs.cs
- RelationshipDetailsRow.cs
- XmlDataSourceNodeDescriptor.cs
- Constant.cs
- RestClientProxyHandler.cs
- ResourceIDHelper.cs
- PassportAuthenticationEventArgs.cs
- HostProtectionPermission.cs
- DataGridViewTextBoxEditingControl.cs
- WindowsFormsHost.cs
- DataMember.cs
- RawTextInputReport.cs
- TableRowCollection.cs
- Rect3DValueSerializer.cs
- RequestContext.cs
- ServiceRoute.cs
- ActionFrame.cs
- WebPartVerb.cs
- DetailsViewDeletedEventArgs.cs
- controlskin.cs
- FileUpload.cs
- AliasGenerator.cs
- MediaPlayerState.cs
- FixedSchema.cs
- SiteMembershipCondition.cs
- SortedList.cs
- URLAttribute.cs
- TextBoxRenderer.cs
- CodeEntryPointMethod.cs
- FormViewCommandEventArgs.cs
- SecurityException.cs
- OracleDataReader.cs
- BinaryObjectReader.cs
- LowerCaseStringConverter.cs
- ComponentCommands.cs
- DesignConnectionCollection.cs
- HierarchicalDataBoundControlAdapter.cs
- FileReservationCollection.cs
- EntityConnectionStringBuilderItem.cs
- ActiveDocumentEvent.cs
- MetadataCache.cs
- ResourceBinder.cs
- path.cs
- HGlobalSafeHandle.cs
- SimpleFieldTemplateUserControl.cs
- ProviderConnectionPointCollection.cs
- Main.cs
- WeakEventManager.cs
- RtfToXamlLexer.cs
- Version.cs
- BrushMappingModeValidation.cs
- SqlDataAdapter.cs
- AssemblyUtil.cs
- BindingNavigator.cs
- SafePEFileHandle.cs
- MenuCommand.cs
- ToolStripArrowRenderEventArgs.cs
- ObjectStateFormatter.cs
- WebPartsPersonalization.cs
- AssociatedControlConverter.cs
- AutoGeneratedField.cs
- HelpEvent.cs
- ProtocolViolationException.cs
- NativeMethods.cs
- MasterPage.cs
- PersonalizationStateInfoCollection.cs
- QuaternionAnimationBase.cs
- RuntimeConfig.cs
- ToolStripSplitStackLayout.cs
- WindowAutomationPeer.cs
- DbConnectionPoolOptions.cs
- EdmComplexPropertyAttribute.cs
- Interlocked.cs
- VisualStateChangedEventArgs.cs
- CollectionViewGroupRoot.cs
- TraceLevelStore.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- SqlBulkCopy.cs
- TrackingDataItem.cs
- AsymmetricSignatureFormatter.cs
- WindowsClaimSet.cs
- BufferedStream.cs
- Page.cs
- InitializationEventAttribute.cs
- _CacheStreams.cs
- SettingsSavedEventArgs.cs
- ProcessThread.cs
- Util.cs
- ResXResourceWriter.cs
- MetadataWorkspace.cs
- dtdvalidator.cs
- MimeTypePropertyAttribute.cs
- OciEnlistContext.cs
- ToolStripOverflowButton.cs
- ObjectDataSourceSelectingEventArgs.cs
- PartialTrustVisibleAssemblyCollection.cs
- XmlCharacterData.cs
- GridViewRowCollection.cs