Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / CodeDOM / CodeAttributeDeclaration.cs / 1305376 / CodeAttributeDeclaration.cs
//------------------------------------------------------------------------------ //// // //----------------------------------------------------------------------------- namespace System.CodeDom { using System.Diagnostics; using System; using Microsoft.Win32; using System.Collections; using System.Runtime.InteropServices; using System.Runtime.Serialization; ///[....] // Copyright (c) Microsoft Corporation. All rights reserved. ///// [ 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// The arguments for the attribute. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextFormatterContext.cs
- EntityContainerAssociationSet.cs
- GroupQuery.cs
- ByteStorage.cs
- CodeNamespaceCollection.cs
- TypeConverterHelper.cs
- HashHelper.cs
- QueryStatement.cs
- ZoneIdentityPermission.cs
- XmlSortKey.cs
- parserscommon.cs
- StylusPointPropertyInfoDefaults.cs
- XmlSchema.cs
- EventDriven.cs
- ZoneIdentityPermission.cs
- SRGSCompiler.cs
- WindowCollection.cs
- ClientSideProviderDescription.cs
- ShimAsPublicXamlType.cs
- XmlIterators.cs
- Rule.cs
- WebReferencesBuildProvider.cs
- XamlFigureLengthSerializer.cs
- ContractInferenceHelper.cs
- ImageMetadata.cs
- DataPagerFieldCommandEventArgs.cs
- WebControl.cs
- FileUtil.cs
- AccessedThroughPropertyAttribute.cs
- XPathNavigatorKeyComparer.cs
- ArraySet.cs
- RectAnimationBase.cs
- PropertyPathWorker.cs
- MdImport.cs
- DirectoryObjectSecurity.cs
- EmptyCollection.cs
- WpfXamlMember.cs
- XamlStream.cs
- FormsAuthenticationCredentials.cs
- LoadWorkflowByKeyAsyncResult.cs
- StructureChangedEventArgs.cs
- MenuItemStyleCollection.cs
- IProvider.cs
- XamlUtilities.cs
- TextEffect.cs
- RecordsAffectedEventArgs.cs
- ItemContainerGenerator.cs
- BaseCodeDomTreeGenerator.cs
- DataGridViewHeaderCell.cs
- MethodExecutor.cs
- SecurityDescriptor.cs
- CounterCreationData.cs
- PageSettings.cs
- PhysicalAddress.cs
- ReaderContextStackData.cs
- StorageConditionPropertyMapping.cs
- FileDialog_Vista.cs
- WindowsPen.cs
- FreeFormDesigner.cs
- CultureNotFoundException.cs
- PropertyChangeTracker.cs
- RC2.cs
- MultiByteCodec.cs
- PageSetupDialog.cs
- TypeUsage.cs
- ViewManager.cs
- NonClientArea.cs
- DragStartedEventArgs.cs
- entitydatasourceentitysetnameconverter.cs
- ChannelParameterCollection.cs
- WpfGeneratedKnownProperties.cs
- WorkerRequest.cs
- DocumentXmlWriter.cs
- LogExtentCollection.cs
- SqlServices.cs
- RegexReplacement.cs
- securitycriticaldata.cs
- MetadataCache.cs
- SecurityContext.cs
- BookmarkList.cs
- ListViewItemSelectionChangedEvent.cs
- Geometry3D.cs
- LiteralControl.cs
- BitmapEffectGroup.cs
- NamespaceExpr.cs
- SequentialOutput.cs
- CodeGenHelper.cs
- CommandLibraryHelper.cs
- TransformerInfoCollection.cs
- TextBoxView.cs
- DetailsViewDeleteEventArgs.cs
- StaticContext.cs
- ClientProxyGenerator.cs
- IdentifierService.cs
- ExtenderHelpers.cs
- UnhandledExceptionEventArgs.cs
- RelatedEnd.cs
- Merger.cs
- DataTableCollection.cs
- BitmapMetadataEnumerator.cs