Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / CodeDOM / CodeAttributeDeclaration.cs / 1 / CodeAttributeDeclaration.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.CodeDom { using System.Diagnostics; using System; using Microsoft.Win32; using System.Collections; using System.Runtime.InteropServices; using System.Runtime.Serialization; ////// [ ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable, ] public class CodeAttributeDeclaration { private string name; private CodeAttributeArgumentCollection arguments = new CodeAttributeArgumentCollection(); [OptionalField] private CodeTypeReference attributeType; ////// Represents a single custom attribute. /// ////// public CodeAttributeDeclaration() { } ////// Initializes a new instance of ///. /// /// public CodeAttributeDeclaration(string name) { Name = name; } ////// Initializes a new instance of ///using the specified name. /// /// public CodeAttributeDeclaration(string name, params CodeAttributeArgument[] arguments) { Name = name; Arguments.AddRange(arguments); } public CodeAttributeDeclaration(CodeTypeReference attributeType) : this ( attributeType, null) { } public CodeAttributeDeclaration(CodeTypeReference attributeType, params CodeAttributeArgument[] arguments) { this.attributeType = attributeType; if( attributeType != null) { this.name = attributeType.BaseType; } if(arguments != null) { Arguments.AddRange(arguments); } } ////// Initializes a new instance of ///using the specified /// arguments. /// /// public string Name { get { return (name == null) ? string.Empty : name; } set { name = value; attributeType = new CodeTypeReference(name); } } ////// The name of the attribute being declared. /// ////// public CodeAttributeArgumentCollection Arguments { get { return arguments; } } public CodeTypeReference AttributeType { get { return attributeType; } } } }/// The arguments for the attribute. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewButtonCell.cs
- StatusBarItem.cs
- Variant.cs
- ListCommandEventArgs.cs
- SQLInt32.cs
- FixedPosition.cs
- SHA512.cs
- XmlLinkedNode.cs
- StreamWriter.cs
- ServiceOperationParameter.cs
- EmptyQuery.cs
- GridLengthConverter.cs
- FaultCallbackWrapper.cs
- ServicePoint.cs
- IndicCharClassifier.cs
- Pair.cs
- baseaxisquery.cs
- Condition.cs
- HeaderUtility.cs
- WaitHandle.cs
- Schema.cs
- Storyboard.cs
- WrapPanel.cs
- CatalogZoneDesigner.cs
- CodeIdentifier.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ScrollChrome.cs
- EntityCommandExecutionException.cs
- TextViewDesigner.cs
- DisableDpiAwarenessAttribute.cs
- SafeTimerHandle.cs
- PreviewPrintController.cs
- ListBoxItem.cs
- _WebProxyDataBuilder.cs
- ParallelLoopState.cs
- ComponentGlyph.cs
- ToolStripTemplateNode.cs
- TreeWalker.cs
- CacheEntry.cs
- StorageAssociationTypeMapping.cs
- PictureBox.cs
- TextCompositionEventArgs.cs
- List.cs
- PolygonHotSpot.cs
- HttpFileCollectionBase.cs
- RawStylusInputReport.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- VirtualPathUtility.cs
- Size.cs
- Button.cs
- SQLBytesStorage.cs
- HostProtectionPermission.cs
- ReaderOutput.cs
- DataRowCollection.cs
- ObjectAnimationUsingKeyFrames.cs
- TextBoxDesigner.cs
- ManagedFilter.cs
- BehaviorEditorPart.cs
- XamlTypeMapperSchemaContext.cs
- ContainerFilterService.cs
- InkCanvasSelectionAdorner.cs
- COM2PictureConverter.cs
- ImportContext.cs
- DBCommandBuilder.cs
- SoapMessage.cs
- TextChangedEventArgs.cs
- SessionStateSection.cs
- TextDecorationCollectionConverter.cs
- StreamAsIStream.cs
- CssTextWriter.cs
- WebHttpEndpoint.cs
- PointCollectionConverter.cs
- ChineseLunisolarCalendar.cs
- Dump.cs
- CapabilitiesState.cs
- UnsafeNativeMethods.cs
- _LocalDataStoreMgr.cs
- Util.cs
- XComponentModel.cs
- TagMapInfo.cs
- SchemaComplexType.cs
- CollectionBase.cs
- ResourceDictionaryCollection.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- CmsUtils.cs
- TextTreeTextBlock.cs
- HtmlInputReset.cs
- PriorityItem.cs
- SafeSecurityHandles.cs
- OdbcPermission.cs
- XmlReader.cs
- Util.cs
- UIInitializationException.cs
- HelloOperation11AsyncResult.cs
- SharedUtils.cs
- TreeNodeCollection.cs
- columnmapkeybuilder.cs
- CommandEventArgs.cs
- CacheHelper.cs
- LicenseException.cs