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
- AuthenticationService.cs
- Manipulation.cs
- PropertyFilter.cs
- XslVisitor.cs
- UnsafeNativeMethods.cs
- SendMessageChannelCache.cs
- TypeBrowserDialog.cs
- ExpressionDumper.cs
- Normalization.cs
- PropertyEntry.cs
- CachedFontFamily.cs
- DebugView.cs
- QualifiedCellIdBoolean.cs
- StrongTypingException.cs
- ToolboxItemAttribute.cs
- rsa.cs
- TableLayoutStyleCollection.cs
- FloatMinMaxAggregationOperator.cs
- NavigatingCancelEventArgs.cs
- TraceProvider.cs
- FileFormatException.cs
- ObjectDataSourceChooseMethodsPanel.cs
- DataGridItemEventArgs.cs
- RichTextBox.cs
- BufferedReadStream.cs
- messageonlyhwndwrapper.cs
- AnyReturnReader.cs
- TextRangeSerialization.cs
- ObjectHelper.cs
- InputReferenceExpression.cs
- TreeViewBindingsEditorForm.cs
- DbDeleteCommandTree.cs
- MarginCollapsingState.cs
- HttpModuleAction.cs
- TextTreeInsertUndoUnit.cs
- PeerNameRecordCollection.cs
- Model3DCollection.cs
- ScaleTransform.cs
- Exceptions.cs
- WebControlAdapter.cs
- MetadataArtifactLoader.cs
- UIPermission.cs
- ConnectionConsumerAttribute.cs
- SingleSelectRootGridEntry.cs
- AttachInfo.cs
- listitem.cs
- SmiMetaData.cs
- Error.cs
- FontEmbeddingManager.cs
- LambdaCompiler.Unary.cs
- AssociationTypeEmitter.cs
- ToolStripDesignerUtils.cs
- OraclePermission.cs
- loginstatus.cs
- ProgressBar.cs
- QuaternionValueSerializer.cs
- Int32Collection.cs
- ContextMenu.cs
- ActivityExecutor.cs
- QilGenerator.cs
- ViewCellSlot.cs
- VisualBasicSettingsHandler.cs
- ExpressionBuilder.cs
- AssertFilter.cs
- SQLDecimal.cs
- ToolStripRendererSwitcher.cs
- WindowsMenu.cs
- DbConnectionStringBuilder.cs
- ExpressionConverter.cs
- MessageSmuggler.cs
- Message.cs
- CookieProtection.cs
- IPipelineRuntime.cs
- CodeMemberMethod.cs
- MappedMetaModel.cs
- QueryOptionExpression.cs
- DataGridViewCellStyleEditor.cs
- Adorner.cs
- BadImageFormatException.cs
- InnerItemCollectionView.cs
- SharedPerformanceCounter.cs
- XmlWellformedWriter.cs
- WmlListAdapter.cs
- MexServiceChannelBuilder.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- RepeaterItemCollection.cs
- ToolStripGrip.cs
- ValidationResult.cs
- XmlSchemaAttributeGroupRef.cs
- DLinqDataModelProvider.cs
- Msec.cs
- RuntimeHandles.cs
- RegionIterator.cs
- WebBaseEventKeyComparer.cs
- AsyncResult.cs
- TargetParameterCountException.cs
- DropTarget.cs
- DataControlField.cs
- isolationinterop.cs
- ListViewItem.cs