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
- AsymmetricKeyExchangeFormatter.cs
- graph.cs
- DescendentsWalkerBase.cs
- IgnoreSectionHandler.cs
- OneToOneMappingSerializer.cs
- Line.cs
- ObjectSet.cs
- BitStream.cs
- PaperSize.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- Repeater.cs
- ConfigurationConverterBase.cs
- DuplicateWaitObjectException.cs
- SatelliteContractVersionAttribute.cs
- XmlDeclaration.cs
- DeferredSelectedIndexReference.cs
- EventDescriptor.cs
- BatchParser.cs
- GenericIdentity.cs
- cache.cs
- ResXFileRef.cs
- ArrayListCollectionBase.cs
- AsyncOperation.cs
- DisableDpiAwarenessAttribute.cs
- NamespaceInfo.cs
- DataPager.cs
- DefaultHttpHandler.cs
- ProxyAssemblyNotLoadedException.cs
- Select.cs
- WindowsRichEdit.cs
- Vector3DValueSerializer.cs
- LinqDataSourceSelectEventArgs.cs
- ModelUIElement3D.cs
- ClickablePoint.cs
- HtmlTableRow.cs
- EventLogEntryCollection.cs
- DataPager.cs
- HandlerWithFactory.cs
- ValueTypeFixupInfo.cs
- ParagraphVisual.cs
- XmlAttributeProperties.cs
- UserControlBuildProvider.cs
- DecimalAnimation.cs
- RecognizerInfo.cs
- ValueQuery.cs
- xmlNames.cs
- HtmlInputCheckBox.cs
- SmtpFailedRecipientException.cs
- Vector.cs
- XmlWellformedWriter.cs
- BuildProviderUtils.cs
- StrongTypingException.cs
- TextParagraphCache.cs
- ToolStripButton.cs
- AssemblyResourceLoader.cs
- DeviceFiltersSection.cs
- PixelFormat.cs
- DelayLoadType.cs
- XmlSerializationWriter.cs
- MessageSmuggler.cs
- codemethodreferenceexpression.cs
- Point3DCollectionValueSerializer.cs
- Vector3DAnimationBase.cs
- FlowStep.cs
- ConfigXmlCDataSection.cs
- XPathDocumentIterator.cs
- SecurityTokenAuthenticator.cs
- X509CertificateChain.cs
- TimerElapsedEvenArgs.cs
- DataDesignUtil.cs
- ColumnWidthChangedEvent.cs
- OdbcConnectionFactory.cs
- RtfControlWordInfo.cs
- BamlStream.cs
- SqlResolver.cs
- ExpressionPrefixAttribute.cs
- ObjectView.cs
- login.cs
- WorkflowApplicationAbortedException.cs
- Base64Encoder.cs
- DataSet.cs
- ProxySimple.cs
- OleDbErrorCollection.cs
- Span.cs
- WindowsToolbarItemAsMenuItem.cs
- SchemaTableColumn.cs
- Transform3D.cs
- Marshal.cs
- LayoutTable.cs
- PipelineModuleStepContainer.cs
- BindingCollection.cs
- SpellerStatusTable.cs
- OrderedHashRepartitionEnumerator.cs
- HighlightComponent.cs
- HyperLinkDataBindingHandler.cs
- TransactionFlowBindingElementImporter.cs
- Constraint.cs
- FirstQueryOperator.cs
- DependencyPropertyKind.cs
- ProjectionPlanCompiler.cs