Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / CodeDOM / CodeAttributeDeclaration.cs / 1305376 / 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;
///
///
/// Represents a single custom attribute.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeAttributeDeclaration {
private string name;
private CodeAttributeArgumentCollection arguments = new CodeAttributeArgumentCollection();
[OptionalField]
private CodeTypeReference attributeType;
///
///
/// Initializes a new instance of .
///
///
public CodeAttributeDeclaration() {
}
///
///
/// Initializes a new instance of using the specified name.
///
///
public CodeAttributeDeclaration(string name) {
Name = name;
}
///
///
/// Initializes a new instance of using the specified
/// arguments.
///
///
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);
}
}
///
///
/// The name of the attribute being declared.
///
///
public string Name {
get {
return (name == null) ? string.Empty : name;
}
set {
name = value;
attributeType = new CodeTypeReference(name);
}
}
///
///
/// The arguments for the attribute.
///
///
public CodeAttributeArgumentCollection Arguments {
get {
return arguments;
}
}
public CodeTypeReference AttributeType {
get {
return attributeType;
}
}
}
}
// 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
- ExpressionBuilder.cs
- PathSegmentCollection.cs
- ContainerSelectorActiveEvent.cs
- Predicate.cs
- SessionPageStateSection.cs
- ScrollViewer.cs
- ProfilePropertySettings.cs
- StylusCaptureWithinProperty.cs
- ListItemCollection.cs
- ComponentCollection.cs
- InstallerTypeAttribute.cs
- TextTrailingWordEllipsis.cs
- TableSectionStyle.cs
- SqlWriter.cs
- ConfigXmlReader.cs
- DynamicPropertyHolder.cs
- TextCharacters.cs
- WebServiceFault.cs
- DataGridAddNewRow.cs
- PenThreadWorker.cs
- SecurityManager.cs
- ElementAction.cs
- Cursor.cs
- ChannelManager.cs
- InternalPermissions.cs
- Trigger.cs
- SqlCacheDependency.cs
- TraceAsyncResult.cs
- CqlGenerator.cs
- ConfigViewGenerator.cs
- LineMetrics.cs
- EnumUnknown.cs
- ExpandableObjectConverter.cs
- SqlBulkCopyColumnMapping.cs
- PropertyMap.cs
- Vars.cs
- SoapSchemaImporter.cs
- SHA384.cs
- QuaternionRotation3D.cs
- SvcFileManager.cs
- ThemeableAttribute.cs
- DataMemberFieldConverter.cs
- UnsafeNativeMethodsCLR.cs
- DataControlFieldHeaderCell.cs
- EntityDataSourceReferenceGroup.cs
- QilDataSource.cs
- ProgressPage.cs
- SchemaImporterExtension.cs
- NavigateEvent.cs
- HttpHandlersSection.cs
- SiteMembershipCondition.cs
- SmtpException.cs
- EntryWrittenEventArgs.cs
- CompositeScriptReferenceEventArgs.cs
- _TimerThread.cs
- DrawToolTipEventArgs.cs
- SuppressMessageAttribute.cs
- AtomServiceDocumentSerializer.cs
- ManipulationInertiaStartingEventArgs.cs
- ChunkedMemoryStream.cs
- GACMembershipCondition.cs
- _ConnectStream.cs
- Constraint.cs
- DataGridViewCellMouseEventArgs.cs
- BitmapEffectGroup.cs
- RelationshipType.cs
- PropertyInfoSet.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- DataPagerField.cs
- StringArrayConverter.cs
- SQLInt32.cs
- ReliabilityContractAttribute.cs
- WindowsStartMenu.cs
- Documentation.cs
- ExecutedRoutedEventArgs.cs
- Single.cs
- TextInfo.cs
- PolicyChain.cs
- DynamicILGenerator.cs
- DataControlHelper.cs
- UseManagedPresentationBindingElement.cs
- SrgsSemanticInterpretationTag.cs
- cookie.cs
- FormatConvertedBitmap.cs
- ObjectQuery_EntitySqlExtensions.cs
- DateTimeOffsetStorage.cs
- DataMisalignedException.cs
- MasterPageBuildProvider.cs
- CopyOfAction.cs
- AsyncOperation.cs
- BeginStoryboard.cs
- TextProviderWrapper.cs
- ThicknessConverter.cs
- WebPartZoneBaseDesigner.cs
- COM2ExtendedUITypeEditor.cs
- XPathException.cs
- SortDescription.cs
- RegexTypeEditor.cs
- WebPartDeleteVerb.cs
- DesignBinding.cs