Code:
/ FX-1434 / FX-1434 / 1.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
- Color.cs
- WsatServiceCertificate.cs
- WebZone.cs
- DataGridViewToolTip.cs
- SafeHandle.cs
- Rect.cs
- ChangeBlockUndoRecord.cs
- EntityCollection.cs
- AnimationLayer.cs
- DesignColumnCollection.cs
- DockAndAnchorLayout.cs
- DataBindEngine.cs
- Crc32Helper.cs
- relpropertyhelper.cs
- CatchDesigner.xaml.cs
- RuntimeConfigLKG.cs
- FixedElement.cs
- EllipticalNodeOperations.cs
- ChtmlPageAdapter.cs
- XmlDocumentType.cs
- ValueQuery.cs
- OleDbDataAdapter.cs
- ConnectionPoint.cs
- HttpCacheVaryByContentEncodings.cs
- FlowLayoutSettings.cs
- WrappedIUnknown.cs
- ListSortDescription.cs
- MailMessageEventArgs.cs
- HttpFileCollection.cs
- EntryWrittenEventArgs.cs
- OperationCanceledException.cs
- BooleanExpr.cs
- WindowsEditBoxRange.cs
- XmlKeywords.cs
- SafeTimerHandle.cs
- SubclassTypeValidatorAttribute.cs
- StateRuntime.cs
- TextDocumentView.cs
- ExecutionEngineException.cs
- ValidationResult.cs
- StylusPointPropertyInfoDefaults.cs
- CalendarDayButton.cs
- GeometryHitTestResult.cs
- SelectionItemPatternIdentifiers.cs
- TreeWalkHelper.cs
- CertificateReferenceElement.cs
- GridViewColumnCollection.cs
- Drawing.cs
- KnownIds.cs
- SerialReceived.cs
- WindowsFormsHostPropertyMap.cs
- DataGridViewCellConverter.cs
- MethodCallTranslator.cs
- HostExecutionContextManager.cs
- LocalizedNameDescriptionPair.cs
- _LocalDataStore.cs
- Pen.cs
- GridEntryCollection.cs
- hresults.cs
- CodeCatchClauseCollection.cs
- HTMLTagNameToTypeMapper.cs
- StringStorage.cs
- XomlSerializationHelpers.cs
- WindowShowOrOpenTracker.cs
- DropShadowEffect.cs
- CodeIterationStatement.cs
- AttributeSetAction.cs
- AssemblyEvidenceFactory.cs
- PropertyPushdownHelper.cs
- StoreItemCollection.cs
- RegularExpressionValidator.cs
- InputLangChangeRequestEvent.cs
- SystemIPGlobalStatistics.cs
- EditingCoordinator.cs
- TypeSchema.cs
- SectionVisual.cs
- ObservableDictionary.cs
- TemplateInstanceAttribute.cs
- DataError.cs
- MdbDataFileEditor.cs
- ModuleElement.cs
- CounterCreationData.cs
- OrderByQueryOptionExpression.cs
- WsdlParser.cs
- ContextStaticAttribute.cs
- SqlInternalConnection.cs
- UnionCodeGroup.cs
- IISUnsafeMethods.cs
- IpcClientManager.cs
- ItemsPresenter.cs
- EntityDataSourceContextCreatedEventArgs.cs
- AssemblyInfo.cs
- contentDescriptor.cs
- PipelineModuleStepContainer.cs
- FixedSOMImage.cs
- RuntimeConfigLKG.cs
- OdbcDataAdapter.cs
- AdornedElementPlaceholder.cs
- FieldAccessException.cs
- autovalidator.cs