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
- XmlSchemaDatatype.cs
- TableLayoutSettings.cs
- ArcSegment.cs
- VariableQuery.cs
- RangeValidator.cs
- ProviderCommandInfoUtils.cs
- ToolStripPanel.cs
- WebPartMovingEventArgs.cs
- Parser.cs
- TextPatternIdentifiers.cs
- ClientTarget.cs
- StringInfo.cs
- Type.cs
- TdsParserStaticMethods.cs
- SecurityDescriptor.cs
- PropertyGridEditorPart.cs
- Object.cs
- ApplicationInfo.cs
- XmlSchemaParticle.cs
- SimpleWebHandlerParser.cs
- InnerItemCollectionView.cs
- FormViewUpdatedEventArgs.cs
- ShimAsPublicXamlType.cs
- Imaging.cs
- StructuralObject.cs
- WindowsGrip.cs
- UserMapPath.cs
- XmlSchemaCompilationSettings.cs
- DataControlFieldCell.cs
- AssemblyHash.cs
- ColorPalette.cs
- InkCollectionBehavior.cs
- SpecialNameAttribute.cs
- Camera.cs
- Listbox.cs
- MimeBasePart.cs
- QueryOpeningEnumerator.cs
- ExplicitDiscriminatorMap.cs
- AssertSection.cs
- MetafileHeaderEmf.cs
- ClientRolePrincipal.cs
- DrawingContextWalker.cs
- hwndwrapper.cs
- AnonymousIdentificationModule.cs
- Manipulation.cs
- ItemCheckedEvent.cs
- TextTreeRootNode.cs
- EdmSchemaAttribute.cs
- CompilerCollection.cs
- MultiTrigger.cs
- MobileTextWriter.cs
- PngBitmapDecoder.cs
- ProxyHwnd.cs
- CanonicalXml.cs
- ObjectDataSourceChooseTypePanel.cs
- AttributeCollection.cs
- XXXOnTypeBuilderInstantiation.cs
- JapaneseLunisolarCalendar.cs
- NominalTypeEliminator.cs
- safemediahandle.cs
- NullableConverter.cs
- PaginationProgressEventArgs.cs
- DbMetaDataCollectionNames.cs
- TreeWalker.cs
- HandlerMappingMemo.cs
- WebRequestModulesSection.cs
- CaseExpr.cs
- MediaTimeline.cs
- _NestedSingleAsyncResult.cs
- AssemblyBuilder.cs
- ContainerParaClient.cs
- AssociationSetEnd.cs
- ReversePositionQuery.cs
- XmlComplianceUtil.cs
- Compilation.cs
- LogLogRecordHeader.cs
- Int64Storage.cs
- Bookmark.cs
- precedingsibling.cs
- Size3DValueSerializer.cs
- XmlHelper.cs
- ReflectionPermission.cs
- HorizontalAlignConverter.cs
- FixedDSBuilder.cs
- EventRoute.cs
- MorphHelper.cs
- LinkLabel.cs
- GroupBox.cs
- TreeBuilderBamlTranslator.cs
- ProviderSettings.cs
- ContentValidator.cs
- ListViewInsertEventArgs.cs
- SafeBitVector32.cs
- EventPropertyMap.cs
- HttpPostServerProtocol.cs
- ListViewItemSelectionChangedEvent.cs
- Dynamic.cs
- ValidationSummary.cs
- MulticastDelegate.cs
- NativeActivityTransactionContext.cs