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
- SR.cs
- XmlNamespaceManager.cs
- CategoryGridEntry.cs
- UnsafeNativeMethods.cs
- SoapCodeExporter.cs
- ContentDisposition.cs
- SQLDecimal.cs
- BrushConverter.cs
- DesignerDataTable.cs
- RewritingSimplifier.cs
- CqlIdentifiers.cs
- HttpProcessUtility.cs
- DocumentReferenceCollection.cs
- rsa.cs
- Deflater.cs
- EntityType.cs
- ToolStripEditorManager.cs
- TypeDependencyAttribute.cs
- CancelAsyncOperationRequest.cs
- SiteMapPathDesigner.cs
- BufferedGraphicsManager.cs
- XmlSchemaValidationException.cs
- CallbackHandler.cs
- CodeVariableDeclarationStatement.cs
- ControlCollection.cs
- PixelFormatConverter.cs
- ValueConversionAttribute.cs
- RuleAction.cs
- UriTemplateTrieLocation.cs
- SchemaCompiler.cs
- XPathBinder.cs
- IisTraceListener.cs
- CompositeFontFamily.cs
- DriveInfo.cs
- IdlingCommunicationPool.cs
- TextRunTypographyProperties.cs
- SiteMapHierarchicalDataSourceView.cs
- Vector3D.cs
- ProviderConnectionPointCollection.cs
- GridViewColumnHeader.cs
- DBDataPermissionAttribute.cs
- validation.cs
- XmlNodeReader.cs
- CompilerState.cs
- HitTestResult.cs
- DataGridHeaderBorder.cs
- ListControlBoundActionList.cs
- FamilyTypeface.cs
- PropertyKey.cs
- IRCollection.cs
- ScriptResourceDefinition.cs
- OdbcConnectionString.cs
- BufferBuilder.cs
- HttpChannelHelper.cs
- AccessViolationException.cs
- TypeInformation.cs
- Menu.cs
- StaticSiteMapProvider.cs
- DataColumnPropertyDescriptor.cs
- TextTreeObjectNode.cs
- DeleteHelper.cs
- XmlSchemaIdentityConstraint.cs
- Vector3DAnimationBase.cs
- SystemTcpConnection.cs
- IODescriptionAttribute.cs
- XDRSchema.cs
- UmAlQuraCalendar.cs
- FileDataSourceCache.cs
- LabelLiteral.cs
- URLAttribute.cs
- RSAPKCS1SignatureFormatter.cs
- Pen.cs
- SqlNamer.cs
- ClientSettings.cs
- Certificate.cs
- AnonymousIdentificationSection.cs
- NativeCppClassAttribute.cs
- IsolatedStorageSecurityState.cs
- BindingValueChangedEventArgs.cs
- ContravarianceAdapter.cs
- ResourcePool.cs
- MexServiceChannelBuilder.cs
- Container.cs
- RemotingConfigParser.cs
- ToolStripSplitStackLayout.cs
- NameValueCache.cs
- ManifestBasedResourceGroveler.cs
- Span.cs
- HelloMessageCD1.cs
- EventHandlerService.cs
- WindowsIPAddress.cs
- InputBuffer.cs
- NetCodeGroup.cs
- ItemList.cs
- HttpClientCertificate.cs
- Int32Collection.cs
- EndpointBehaviorElement.cs
- Properties.cs
- DataBoundControlHelper.cs
- GraphicsContext.cs