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
- DateTimeOffsetConverter.cs
- RuntimeWrappedException.cs
- RSAPKCS1SignatureDeformatter.cs
- LicenseException.cs
- TextViewDesigner.cs
- SchemaCollectionCompiler.cs
- ImageFormat.cs
- SiteMapDataSourceView.cs
- MergeFilterQuery.cs
- SecurityTokenResolver.cs
- StyleTypedPropertyAttribute.cs
- ClrPerspective.cs
- BamlCollectionHolder.cs
- SchemaConstraints.cs
- AssociationTypeEmitter.cs
- DataGridPagerStyle.cs
- InheritanceContextHelper.cs
- NavigationPropertyEmitter.cs
- OraclePermission.cs
- CSharpCodeProvider.cs
- PageThemeBuildProvider.cs
- TabControl.cs
- Configuration.cs
- CollectionConverter.cs
- HttpListenerPrefixCollection.cs
- Vector3DCollectionConverter.cs
- XmlSchemaSimpleContentRestriction.cs
- XmlToDatasetMap.cs
- StringTraceRecord.cs
- RepeaterDesigner.cs
- SimpleModelProvider.cs
- SecUtil.cs
- GeneralTransformGroup.cs
- BitmapMetadataEnumerator.cs
- RightsManagementEncryptedStream.cs
- TextMetrics.cs
- ListViewInsertedEventArgs.cs
- TimelineGroup.cs
- ExtenderProvidedPropertyAttribute.cs
- Point.cs
- ButtonFlatAdapter.cs
- BuilderInfo.cs
- MessageSecurityOverMsmq.cs
- WmpBitmapEncoder.cs
- ApplicationManager.cs
- DataStorage.cs
- webbrowsersite.cs
- WebPartEventArgs.cs
- InputManager.cs
- Comparer.cs
- AddressHeaderCollection.cs
- PocoPropertyAccessorStrategy.cs
- AssemblyName.cs
- ManagementClass.cs
- Cast.cs
- TlsnegoTokenProvider.cs
- CaseCqlBlock.cs
- Label.cs
- TextSelectionHelper.cs
- WebPartConnectionsDisconnectVerb.cs
- EntityKey.cs
- TrackingMemoryStream.cs
- FormatPage.cs
- TerminatorSinks.cs
- SafeNativeMethodsOther.cs
- ApplicationId.cs
- RetrieveVirtualItemEventArgs.cs
- ResetableIterator.cs
- MediaContextNotificationWindow.cs
- WindowsRichEditRange.cs
- SimpleLine.cs
- Activator.cs
- TaiwanLunisolarCalendar.cs
- SecurityElement.cs
- ProjectedWrapper.cs
- RelatedCurrencyManager.cs
- ContentWrapperAttribute.cs
- EncoderParameters.cs
- xml.cs
- TextBox.cs
- EditorPartChrome.cs
- ActivityDesignerResources.cs
- Debugger.cs
- SolidColorBrush.cs
- AdapterUtil.cs
- ContractNamespaceAttribute.cs
- xmlfixedPageInfo.cs
- TextCompositionEventArgs.cs
- DataSourceView.cs
- TextRangeSerialization.cs
- MetadataLocation.cs
- UnaryNode.cs
- DiscoveryDocument.cs
- WebSysDescriptionAttribute.cs
- SafeRightsManagementHandle.cs
- NameTable.cs
- PointAnimationBase.cs
- BoolExpression.cs
- XmlRootAttribute.cs
- BooleanFunctions.cs