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
- XmlWellformedWriter.cs
- ProfessionalColorTable.cs
- AffineTransform3D.cs
- PerformanceCounterLib.cs
- ObjectTag.cs
- TableRowCollection.cs
- BinaryObjectReader.cs
- Models.cs
- Exception.cs
- AssemblyBuilder.cs
- FileIOPermission.cs
- COM2EnumConverter.cs
- SqlFileStream.cs
- TypeLibConverter.cs
- DuplicateWaitObjectException.cs
- ComPlusContractBehavior.cs
- Binding.cs
- SiteMap.cs
- ListViewHitTestInfo.cs
- UIElementParaClient.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- XPathNodeIterator.cs
- WebPartHeaderCloseVerb.cs
- DataRowIndexBuffer.cs
- StringUtil.cs
- OracleConnection.cs
- ConfigurationManagerInternalFactory.cs
- ActiveXHelper.cs
- FixUpCollection.cs
- columnmapkeybuilder.cs
- DataBinder.cs
- QuotedPrintableStream.cs
- GetPageCompletedEventArgs.cs
- BulletChrome.cs
- BuildDependencySet.cs
- EntityStoreSchemaFilterEntry.cs
- KeyValuePair.cs
- SmtpMail.cs
- CalendarData.cs
- Point3DAnimationBase.cs
- VariableValue.cs
- Dispatcher.cs
- Base64WriteStateInfo.cs
- WebServiceMethodData.cs
- DriveInfo.cs
- XmlSchemaFacet.cs
- XmlUrlResolver.cs
- SimpleHandlerBuildProvider.cs
- BindingSource.cs
- XmlConvert.cs
- peersecurityelement.cs
- AddingNewEventArgs.cs
- WebPartAddingEventArgs.cs
- NavigatorInput.cs
- DataGridTextBoxColumn.cs
- SqlServer2KCompatibilityCheck.cs
- StringUtil.cs
- BevelBitmapEffect.cs
- DataGridViewCellValueEventArgs.cs
- SqlBuilder.cs
- TimeSpan.cs
- Transform3D.cs
- BindingCompleteEventArgs.cs
- RegexCaptureCollection.cs
- SafeFileMapViewHandle.cs
- CompositeFontFamily.cs
- ColumnHeader.cs
- ParameterModifier.cs
- ToolStripDropDownItemDesigner.cs
- NetSectionGroup.cs
- WebDescriptionAttribute.cs
- DataSourceProvider.cs
- NoPersistScope.cs
- ReferenceConverter.cs
- XmlSchemaCompilationSettings.cs
- HttpResponseInternalWrapper.cs
- DebugController.cs
- QilReplaceVisitor.cs
- PrinterSettings.cs
- BinHexDecoder.cs
- NamespaceImport.cs
- MemberAccessException.cs
- RedirectionProxy.cs
- TypeCodeDomSerializer.cs
- CodeSnippetCompileUnit.cs
- DocumentViewerAutomationPeer.cs
- MethodToken.cs
- InvalidCastException.cs
- BitVector32.cs
- XPathNavigatorReader.cs
- PersonalizationStateInfo.cs
- WebResourceUtil.cs
- Compiler.cs
- OleDbEnumerator.cs
- Handle.cs
- CompiledRegexRunner.cs
- securitycriticaldataClass.cs
- GatewayDefinition.cs
- BigInt.cs
- SQLBinary.cs