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
- EncryptedData.cs
- SerializableTypeCodeDomSerializer.cs
- CodeDelegateCreateExpression.cs
- ProcessThreadDesigner.cs
- DynamicDocumentPaginator.cs
- SingleObjectCollection.cs
- SqlDataSourceQueryConverter.cs
- ServicesSection.cs
- configsystem.cs
- GenericRootAutomationPeer.cs
- DesigntimeLicenseContextSerializer.cs
- AmbientLight.cs
- WeakReferenceKey.cs
- ParagraphVisual.cs
- ConditionValidator.cs
- BitmapEffectRenderDataResource.cs
- CurrencyManager.cs
- RuntimeEnvironment.cs
- QueryExpression.cs
- DisableDpiAwarenessAttribute.cs
- RowVisual.cs
- RestClientProxyHandler.cs
- EditorZoneBase.cs
- CodeParameterDeclarationExpression.cs
- InvokeProviderWrapper.cs
- NominalTypeEliminator.cs
- ErrorRuntimeConfig.cs
- SyndicationDeserializer.cs
- UIntPtr.cs
- SubMenuStyleCollectionEditor.cs
- TextFindEngine.cs
- TextElementEnumerator.cs
- ConnectionPoint.cs
- WebReference.cs
- Queue.cs
- ResXResourceWriter.cs
- DataGridViewBand.cs
- TableLayout.cs
- StrongNameUtility.cs
- AsnEncodedData.cs
- CompilerCollection.cs
- TreeNodeCollectionEditorDialog.cs
- ValueSerializer.cs
- AggregateNode.cs
- Rotation3D.cs
- XPathPatternParser.cs
- Viewport3DVisual.cs
- JsonMessageEncoderFactory.cs
- HostingEnvironmentException.cs
- XamlInt32CollectionSerializer.cs
- CryptoStream.cs
- SecureUICommand.cs
- TiffBitmapEncoder.cs
- CodeStatementCollection.cs
- ToolboxItem.cs
- XmlSchemaAny.cs
- QilStrConcatenator.cs
- StructureChangedEventArgs.cs
- XmlSchemas.cs
- HeaderedContentControl.cs
- AndCondition.cs
- ClassicBorderDecorator.cs
- DefaultTraceListener.cs
- ContentElementAutomationPeer.cs
- FixedSOMSemanticBox.cs
- CopyNodeSetAction.cs
- SystemException.cs
- StylusPointPropertyId.cs
- CheckedListBox.cs
- DataListItemEventArgs.cs
- XsdDataContractExporter.cs
- dataSvcMapFileLoader.cs
- ListDictionary.cs
- UnknownBitmapEncoder.cs
- DataGridSortCommandEventArgs.cs
- SystemBrushes.cs
- IProducerConsumerCollection.cs
- DocumentPageTextView.cs
- CommandDesigner.cs
- HostingPreferredMapPath.cs
- MSAAWinEventWrap.cs
- URLAttribute.cs
- DataSourceHelper.cs
- HyperLinkField.cs
- HtmlElement.cs
- Quack.cs
- StreamReader.cs
- OleDbDataAdapter.cs
- MatrixIndependentAnimationStorage.cs
- MsmqSecureHashAlgorithm.cs
- SHA1CryptoServiceProvider.cs
- SafeNativeMethodsOther.cs
- ButtonAutomationPeer.cs
- HtmlGenericControl.cs
- OdbcRowUpdatingEvent.cs
- BinaryUtilClasses.cs
- InputQueueChannelAcceptor.cs
- SizeConverter.cs
- WorkflowViewStateService.cs
- CompoundFileDeflateTransform.cs