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
- WebControlAdapter.cs
- BlurBitmapEffect.cs
- SafeBitVector32.cs
- CounterCreationDataCollection.cs
- PageWrapper.cs
- TokenBasedSet.cs
- DecimalKeyFrameCollection.cs
- RedBlackList.cs
- SynchronizedDispatch.cs
- RectangleHotSpot.cs
- FormsAuthenticationCredentials.cs
- FirstQueryOperator.cs
- AlignmentYValidation.cs
- HeaderCollection.cs
- FormsAuthentication.cs
- DnsCache.cs
- GregorianCalendar.cs
- OrderToken.cs
- PreProcessInputEventArgs.cs
- TreeViewImageKeyConverter.cs
- XPathDescendantIterator.cs
- TemplateContainer.cs
- ButtonStandardAdapter.cs
- WindowShowOrOpenTracker.cs
- CookielessHelper.cs
- CodeBinaryOperatorExpression.cs
- HScrollProperties.cs
- TemplateBuilder.cs
- Animatable.cs
- Pen.cs
- TileBrush.cs
- HostingMessageProperty.cs
- TextTreeRootTextBlock.cs
- DtrList.cs
- HeaderLabel.cs
- EntityCommandExecutionException.cs
- HwndAppCommandInputProvider.cs
- OpCopier.cs
- CustomTypeDescriptor.cs
- ModelEditingScope.cs
- RemotingConfiguration.cs
- SimpleWebHandlerParser.cs
- ListViewItemEventArgs.cs
- HtmlLiteralTextAdapter.cs
- BitmapFrameDecode.cs
- UserPreferenceChangedEventArgs.cs
- TextEditorCharacters.cs
- HttpChannelBindingToken.cs
- PhysicalOps.cs
- QilPatternVisitor.cs
- ClientUrlResolverWrapper.cs
- OdbcEnvironmentHandle.cs
- RadioButtonAutomationPeer.cs
- PackageProperties.cs
- PresentationTraceSources.cs
- SecUtil.cs
- TrackingProfileCache.cs
- HyperLinkDataBindingHandler.cs
- HtmlTernaryTree.cs
- InlineCollection.cs
- ItemCheckedEvent.cs
- MailMessageEventArgs.cs
- CodeIterationStatement.cs
- ForwardPositionQuery.cs
- SchemaEntity.cs
- PrintingPermissionAttribute.cs
- Matrix.cs
- StringStorage.cs
- KerberosSecurityTokenProvider.cs
- TypeForwardedFromAttribute.cs
- Transform.cs
- CellConstant.cs
- SingleResultAttribute.cs
- PageStatePersister.cs
- TabControl.cs
- ImageUrlEditor.cs
- DefaultPrintController.cs
- TcpTransportManager.cs
- LongMinMaxAggregationOperator.cs
- ItemPager.cs
- PngBitmapEncoder.cs
- DataSourceHelper.cs
- CalendarData.cs
- TypeToTreeConverter.cs
- HierarchicalDataSourceControl.cs
- CellTreeNode.cs
- OSFeature.cs
- GridViewColumnCollection.cs
- XmlSerializerOperationGenerator.cs
- AddingNewEventArgs.cs
- InstanceStore.cs
- SHA1.cs
- ConfigXmlReader.cs
- CollectionEditor.cs
- FirstMatchCodeGroup.cs
- DataServiceHost.cs
- KeyedCollection.cs
- StateManagedCollection.cs
- ToolStripComboBox.cs
- ProviderException.cs