Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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;
///
///
/// 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.
//------------------------------------------------------------------------------
//
// 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
- ControlHelper.cs
- SupportingTokenAuthenticatorSpecification.cs
- PerspectiveCamera.cs
- ExecutionEngineException.cs
- ReadOnlyDataSourceView.cs
- ConfigurationManagerHelperFactory.cs
- XmlQueryContext.cs
- GuidelineSet.cs
- StorageInfo.cs
- Perspective.cs
- UserInitiatedNavigationPermission.cs
- KeyConstraint.cs
- DataGridViewSelectedRowCollection.cs
- UriSection.cs
- AlphabetConverter.cs
- SubordinateTransaction.cs
- validationstate.cs
- HandleCollector.cs
- FileAuthorizationModule.cs
- SymmetricAlgorithm.cs
- dsa.cs
- XmlnsCache.cs
- TheQuery.cs
- DbParameterCollectionHelper.cs
- IdentityVerifier.cs
- xml.cs
- TimeoutConverter.cs
- ObjectCloneHelper.cs
- arabicshape.cs
- Columns.cs
- ProfessionalColorTable.cs
- InvokeDelegate.cs
- UnsafeNativeMethods.cs
- TlsSspiNegotiation.cs
- ServiceHttpHandlerFactory.cs
- XmlSchemaParticle.cs
- _HeaderInfoTable.cs
- TogglePattern.cs
- _TLSstream.cs
- BoundField.cs
- OracleRowUpdatingEventArgs.cs
- SHA1Managed.cs
- WizardSideBarListControlItem.cs
- RuntimeHandles.cs
- PropertyDescriptorGridEntry.cs
- PropertyStore.cs
- SqlBulkCopyColumnMappingCollection.cs
- Int64KeyFrameCollection.cs
- BaseCollection.cs
- DirectionalLight.cs
- WebBaseEventKeyComparer.cs
- DBAsyncResult.cs
- PageParser.cs
- HtmlUtf8RawTextWriter.cs
- RuntimeResourceSet.cs
- BinarySerializer.cs
- SchemeSettingElement.cs
- DataTableMapping.cs
- GeometryHitTestParameters.cs
- IODescriptionAttribute.cs
- OracleConnectionStringBuilder.cs
- MergePropertyDescriptor.cs
- Command.cs
- HtmlInputHidden.cs
- MachineKey.cs
- ToolboxDataAttribute.cs
- CapacityStreamGeometryContext.cs
- EdmFunctionAttribute.cs
- ColumnCollection.cs
- Rect.cs
- SelfIssuedTokenFactoryCredential.cs
- String.cs
- BitmapCacheBrush.cs
- UnaryNode.cs
- DoubleAnimationBase.cs
- MimeFormImporter.cs
- PackagePart.cs
- XmlConverter.cs
- DispatcherHookEventArgs.cs
- AppDomainAttributes.cs
- ColorConverter.cs
- WebServiceParameterData.cs
- EntityDataSourceView.cs
- AppDomain.cs
- ScrollChrome.cs
- SingleAnimation.cs
- DesignerPerfEventProvider.cs
- DrawTreeNodeEventArgs.cs
- DataGridViewColumnHeaderCell.cs
- URLString.cs
- XmlLoader.cs
- SQLMoneyStorage.cs
- TextSegment.cs
- ReachFixedPageSerializerAsync.cs
- TableRowGroupCollection.cs
- CrossSiteScriptingValidation.cs
- MethodRental.cs
- NetSectionGroup.cs
- BamlTreeMap.cs
- ResourceSetExpression.cs