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
- Storyboard.cs
- DataObjectFieldAttribute.cs
- FormViewUpdateEventArgs.cs
- AssociationSetMetadata.cs
- RunClient.cs
- CorrelationTokenInvalidatedHandler.cs
- CompressedStack.cs
- BaseCodeDomTreeGenerator.cs
- FrameworkTemplate.cs
- Binding.cs
- HtmlObjectListAdapter.cs
- SoapExtensionTypeElement.cs
- XmlSignificantWhitespace.cs
- GetImportFileNameRequest.cs
- PathFigure.cs
- MaxSessionCountExceededException.cs
- ObjectIDGenerator.cs
- Composition.cs
- EdmEntityTypeAttribute.cs
- TextElementEnumerator.cs
- CommandField.cs
- GestureRecognitionResult.cs
- Interlocked.cs
- DataControlImageButton.cs
- NullExtension.cs
- GeneralTransform.cs
- DisplayNameAttribute.cs
- Pair.cs
- WorkflowRuntimeSection.cs
- Hashtable.cs
- ListMarkerSourceInfo.cs
- SqlNamer.cs
- ZipFileInfoCollection.cs
- WSSecurityOneDotZeroSendSecurityHeader.cs
- AddInBase.cs
- NodeInfo.cs
- TextHintingModeValidation.cs
- SqlUtils.cs
- MexHttpsBindingElement.cs
- PrintSchema.cs
- AutomationEventArgs.cs
- Pkcs7Recipient.cs
- XpsS0ValidatingLoader.cs
- AddInProcess.cs
- DefaultHttpHandler.cs
- ScriptServiceAttribute.cs
- Win32SafeHandles.cs
- DirtyTextRange.cs
- ViewKeyConstraint.cs
- RIPEMD160Managed.cs
- DesignDataSource.cs
- SkipStoryboardToFill.cs
- DataObjectPastingEventArgs.cs
- StoreItemCollection.Loader.cs
- _CommandStream.cs
- PoisonMessageException.cs
- DataRowIndexBuffer.cs
- IntegerValidatorAttribute.cs
- Stylesheet.cs
- PipelineModuleStepContainer.cs
- RichTextBox.cs
- BamlWriter.cs
- StringStorage.cs
- FusionWrap.cs
- LocalizationComments.cs
- LocalizationParserHooks.cs
- FontInfo.cs
- CodeConditionStatement.cs
- ChineseLunisolarCalendar.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- XmlSchemaSimpleType.cs
- ColorConvertedBitmap.cs
- GridViewDeletedEventArgs.cs
- EventBindingService.cs
- UpdatableWrapper.cs
- Compensate.cs
- ByteStack.cs
- AuthenticatingEventArgs.cs
- MatrixCamera.cs
- HWStack.cs
- BindingSource.cs
- UserPreferenceChangedEventArgs.cs
- MimeBasePart.cs
- Attachment.cs
- ObjectConverter.cs
- CookielessHelper.cs
- HttpApplication.cs
- ContainerParaClient.cs
- XmlReader.cs
- TransformCryptoHandle.cs
- SchemaComplexType.cs
- ExecutionContext.cs
- SmtpTransport.cs
- MetadataArtifactLoaderCompositeFile.cs
- XmlnsPrefixAttribute.cs
- MessageDesigner.cs
- SettingsAttributes.cs
- BitArray.cs
- ManualResetEvent.cs
- WindowsTokenRoleProvider.cs