Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- UnknownBitmapDecoder.cs
- XmlCharType.cs
- CodeFieldReferenceExpression.cs
- SerialErrors.cs
- CompositeDataBoundControl.cs
- LabelDesigner.cs
- JoinGraph.cs
- SecurityTokenReferenceStyle.cs
- XmlBufferReader.cs
- MemberPathMap.cs
- DesignerEditorPartChrome.cs
- ScriptingRoleServiceSection.cs
- DataTableReaderListener.cs
- SoapObjectReader.cs
- SystemShuttingDownException.cs
- ErrorWebPart.cs
- Bezier.cs
- WinEventTracker.cs
- XmlSchemaValidator.cs
- SymbolEqualComparer.cs
- EventSinkActivityDesigner.cs
- Int64Storage.cs
- ErrorTableItemStyle.cs
- WorkflowDebuggerSteppingAttribute.cs
- mediapermission.cs
- EntityClassGenerator.cs
- ObjectSecurity.cs
- XamlTreeBuilderBamlRecordWriter.cs
- SqlMultiplexer.cs
- StreamWriter.cs
- WindowsGrip.cs
- TraceData.cs
- MessageQueuePermissionAttribute.cs
- EmbeddedMailObject.cs
- OleDbInfoMessageEvent.cs
- FilterableAttribute.cs
- LongValidatorAttribute.cs
- wgx_commands.cs
- COM2ColorConverter.cs
- Rules.cs
- ComponentResourceKeyConverter.cs
- MultiView.cs
- PropertyBuilder.cs
- ClientProtocol.cs
- ControlCollection.cs
- BinaryUtilClasses.cs
- DocumentReferenceCollection.cs
- PropagationProtocolsTracing.cs
- KeyFrames.cs
- RTLAwareMessageBox.cs
- PrimaryKeyTypeConverter.cs
- CngAlgorithmGroup.cs
- TextControlDesigner.cs
- PhysicalFontFamily.cs
- CompileXomlTask.cs
- MemberRelationshipService.cs
- DetailsView.cs
- DataSourceProvider.cs
- XmlDataSourceView.cs
- DynamicQueryableWrapper.cs
- FeatureSupport.cs
- EntryPointNotFoundException.cs
- CaseInsensitiveHashCodeProvider.cs
- TextRunCacheImp.cs
- ListChangedEventArgs.cs
- EmbeddedMailObject.cs
- TryLoadRunnableWorkflowCommand.cs
- DescendentsWalkerBase.cs
- serverconfig.cs
- SHA1Cng.cs
- Decorator.cs
- ClientTargetSection.cs
- TCPListener.cs
- CompatibleComparer.cs
- BufferBuilder.cs
- Operators.cs
- SqlWorkflowInstanceStore.cs
- ApplicationServiceHelper.cs
- DirectoryObjectSecurity.cs
- DataTableClearEvent.cs
- BrowserInteropHelper.cs
- GeometryCollection.cs
- x509utils.cs
- ContainerActivationHelper.cs
- RuleSetBrowserDialog.cs
- BitmapMetadata.cs
- ZoomComboBox.cs
- ExpandCollapseProviderWrapper.cs
- ChtmlTextBoxAdapter.cs
- PropertyNames.cs
- SerializerDescriptor.cs
- DataGridViewColumnHeaderCell.cs
- EntryPointNotFoundException.cs
- LocationSectionRecord.cs
- FlowLayout.cs
- followingsibling.cs
- Int32Converter.cs
- entityreference_tresulttype.cs
- XmlDictionaryReaderQuotas.cs
- CheckedListBox.cs