Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Application.cs
- PreProcessor.cs
- DtrList.cs
- SmiMetaDataProperty.cs
- PolicyValidationException.cs
- WmlCommandAdapter.cs
- SystemTcpConnection.cs
- ResourceReferenceExpressionConverter.cs
- SqlError.cs
- XMLSyntaxException.cs
- ErrorRuntimeConfig.cs
- XmlSchemaObjectTable.cs
- TrustManagerMoreInformation.cs
- SizeAnimation.cs
- DesignerVerbCollection.cs
- SqlRecordBuffer.cs
- DataGridViewColumnCollectionEditor.cs
- GroupByExpressionRewriter.cs
- TextSerializer.cs
- ADConnectionHelper.cs
- ModelVisual3D.cs
- XPathParser.cs
- CheckPair.cs
- GcHandle.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- EntityDataSourceEntitySetNameItem.cs
- PagesSection.cs
- RangeValueProviderWrapper.cs
- FunctionImportElement.cs
- SchemaTableColumn.cs
- ResourceDescriptionAttribute.cs
- UpdateTracker.cs
- QuotedPrintableStream.cs
- GroupDescription.cs
- ClaimTypes.cs
- StringPropertyBuilder.cs
- ListItemParagraph.cs
- QueryGeneratorBase.cs
- FlowLayout.cs
- XmlSchemaObjectTable.cs
- Point4D.cs
- PropertyGridEditorPart.cs
- isolationinterop.cs
- Facet.cs
- ConfigurationSettings.cs
- DataGridViewLinkCell.cs
- DataServiceStreamProviderWrapper.cs
- DiscoveryInnerClientManaged11.cs
- DocumentApplicationJournalEntry.cs
- GatewayIPAddressInformationCollection.cs
- WindowsComboBox.cs
- Sql8ExpressionRewriter.cs
- SQLByteStorage.cs
- AmbientLight.cs
- control.ime.cs
- RijndaelManaged.cs
- MarginsConverter.cs
- DocumentSequence.cs
- GZipObjectSerializer.cs
- GZipUtils.cs
- BlockCollection.cs
- EventHandlersStore.cs
- EllipseGeometry.cs
- SamlAuthorizationDecisionStatement.cs
- DivideByZeroException.cs
- ItemContainerProviderWrapper.cs
- TransactionChannelListener.cs
- WriteFileContext.cs
- PenContexts.cs
- Attributes.cs
- HitTestParameters3D.cs
- RtfFormatStack.cs
- Transform3D.cs
- HitTestResult.cs
- PerspectiveCamera.cs
- InfoCardRSACryptoProvider.cs
- Lasso.cs
- TransformedBitmap.cs
- RuleProcessor.cs
- Tuple.cs
- XPathNodeList.cs
- IntSecurity.cs
- CultureSpecificStringDictionary.cs
- ArgumentElement.cs
- SecurityHelper.cs
- FlowDocumentPaginator.cs
- QualificationDataItem.cs
- AccessDataSourceDesigner.cs
- WindowsSecurityTokenAuthenticator.cs
- StringSorter.cs
- XPathDocument.cs
- DetailsViewUpdatedEventArgs.cs
- HelpExampleGenerator.cs
- TextTrailingCharacterEllipsis.cs
- COM2PictureConverter.cs
- Keywords.cs
- controlskin.cs
- WebServiceErrorEvent.cs
- SecurityUniqueId.cs
- UInt64.cs