Code:
/ FX-1434 / FX-1434 / 1.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
- ControlEvent.cs
- DataSourceSelectArguments.cs
- DataTablePropertyDescriptor.cs
- ImageMetadata.cs
- MediaPlayerState.cs
- XmlSiteMapProvider.cs
- TextInfo.cs
- ArrangedElement.cs
- CompilerCollection.cs
- PasswordRecovery.cs
- TypeDescriptionProviderAttribute.cs
- ResourceKey.cs
- SiteMapPath.cs
- ResXResourceWriter.cs
- RecordManager.cs
- FeatureManager.cs
- ParseHttpDate.cs
- HttpCapabilitiesBase.cs
- ResourceExpressionBuilder.cs
- BamlBinaryWriter.cs
- ListChangedEventArgs.cs
- GPStream.cs
- MethodCallTranslator.cs
- OracleParameter.cs
- PersistChildrenAttribute.cs
- BamlResourceContent.cs
- ScrollItemPattern.cs
- OracleParameter.cs
- ObjectTypeMapping.cs
- ProxyWebPart.cs
- TaskbarItemInfo.cs
- CodeConstructor.cs
- SectionVisual.cs
- SmiEventSink_DeferedProcessing.cs
- DataPointer.cs
- ConnectionManagementSection.cs
- FixedSOMTable.cs
- TableLayoutStyle.cs
- RowUpdatedEventArgs.cs
- SchemaAttDef.cs
- ToolStripItemCollection.cs
- filewebresponse.cs
- XmlStringTable.cs
- JapaneseCalendar.cs
- PropertiesTab.cs
- CatalogPartChrome.cs
- PenContexts.cs
- RuleSettings.cs
- PipelineDeploymentState.cs
- CheckedListBox.cs
- Geometry.cs
- BinaryConverter.cs
- DataGridViewColumnEventArgs.cs
- MarshalDirectiveException.cs
- UIElementCollection.cs
- ResourceDictionary.cs
- Button.cs
- DataGridClipboardCellContent.cs
- ModelUIElement3D.cs
- SessionIDManager.cs
- BuildManager.cs
- XmlDictionary.cs
- ToolBarOverflowPanel.cs
- SqlConnectionHelper.cs
- AutomationEvent.cs
- Registry.cs
- SourceFilter.cs
- SelectionEditor.cs
- listitem.cs
- PresentationAppDomainManager.cs
- EndpointIdentity.cs
- BuildManagerHost.cs
- DefaultHttpHandler.cs
- WebBrowserNavigatingEventHandler.cs
- FontStretchConverter.cs
- PagesChangedEventArgs.cs
- ReferentialConstraint.cs
- ServiceReference.cs
- ColumnMapVisitor.cs
- XmlAnyAttributeAttribute.cs
- LayeredChannelFactory.cs
- WindowsFormsSynchronizationContext.cs
- DispatcherExceptionFilterEventArgs.cs
- Symbol.cs
- shaperfactoryquerycachekey.cs
- ConditionalAttribute.cs
- DesigntimeLicenseContext.cs
- TypeUnloadedException.cs
- SQlBooleanStorage.cs
- HMACRIPEMD160.cs
- WebPartConnection.cs
- InfoCardBaseException.cs
- BindingList.cs
- LockCookie.cs
- Style.cs
- BasePattern.cs
- CultureInfo.cs
- ColorContextHelper.cs
- SqlInternalConnectionTds.cs
- HGlobalSafeHandle.cs