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
- EntityModelBuildProvider.cs
- TemplateComponentConnector.cs
- DataServiceQueryOfT.cs
- PieceDirectory.cs
- BitmapScalingModeValidation.cs
- PostBackOptions.cs
- StoreAnnotationsMap.cs
- WeakReadOnlyCollection.cs
- ReverseComparer.cs
- XmlLanguage.cs
- InheritanceUI.cs
- SizeAnimationBase.cs
- WindowsNonControl.cs
- DBSchemaRow.cs
- PageContentCollection.cs
- newinstructionaction.cs
- DocumentPaginator.cs
- TextEvent.cs
- CodePageEncoding.cs
- DecimalAverageAggregationOperator.cs
- EncodingInfo.cs
- SqlFunctionAttribute.cs
- TitleStyle.cs
- UrlAuthorizationModule.cs
- GlobalItem.cs
- RuntimeEnvironment.cs
- MetaChildrenColumn.cs
- RestClientProxyHandler.cs
- XmlAnyElementAttribute.cs
- SqlUtil.cs
- BasePropertyDescriptor.cs
- FixUpCollection.cs
- FileSystemEventArgs.cs
- FontSizeConverter.cs
- DropDownList.cs
- SubpageParagraph.cs
- VectorCollectionConverter.cs
- DataViewManager.cs
- DetailsViewPageEventArgs.cs
- MulticastOption.cs
- MissingMethodException.cs
- ChannelServices.cs
- NativeMethods.cs
- QuadraticBezierSegment.cs
- ReferenceCountedObject.cs
- RegexBoyerMoore.cs
- FragmentQueryKB.cs
- BaseTemplateParser.cs
- ResolveRequestResponseAsyncResult.cs
- Helper.cs
- XmlSchemaGroupRef.cs
- SymbolTable.cs
- SerializationException.cs
- ProtocolsConfiguration.cs
- Vector3DAnimation.cs
- BevelBitmapEffect.cs
- OracleParameter.cs
- JsonDeserializer.cs
- PagesChangedEventArgs.cs
- PassportIdentity.cs
- WeakReference.cs
- GeneralTransform3DGroup.cs
- ValueTypeFieldReference.cs
- DataGridToolTip.cs
- Math.cs
- QueryableFilterRepeater.cs
- VectorCollectionConverter.cs
- SafeJobHandle.cs
- UICuesEvent.cs
- AstTree.cs
- HttpRequestWrapper.cs
- ApplicationFileCodeDomTreeGenerator.cs
- CodeDirectoryCompiler.cs
- WebServiceResponse.cs
- QueryPrefixOp.cs
- IfJoinedCondition.cs
- BoundField.cs
- PerspectiveCamera.cs
- TemplateEditingVerb.cs
- RequestCacheValidator.cs
- GeometryModel3D.cs
- XmlSchemaChoice.cs
- DataGridTextBoxColumn.cs
- IListConverters.cs
- InvokeWebService.cs
- DataGridViewCheckBoxColumn.cs
- DrawingGroupDrawingContext.cs
- PerfCounters.cs
- XmlSerializerOperationGenerator.cs
- XmlSchemaComplexType.cs
- InvalidAsynchronousStateException.cs
- PagePropertiesChangingEventArgs.cs
- FolderBrowserDialog.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- HttpValueCollection.cs
- CodeObjectCreateExpression.cs
- FloaterBaseParagraph.cs
- StickyNoteAnnotations.cs
- BypassElement.cs
- DBSqlParser.cs