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
- CharConverter.cs
- MultilineStringConverter.cs
- Subset.cs
- HMACRIPEMD160.cs
- ScriptIgnoreAttribute.cs
- HwndStylusInputProvider.cs
- BindStream.cs
- SoapElementAttribute.cs
- Validator.cs
- MediaSystem.cs
- DataServiceQueryException.cs
- ThreadAbortException.cs
- ThousandthOfEmRealPoints.cs
- XamlInt32CollectionSerializer.cs
- LogEntryHeaderv1Deserializer.cs
- QuadraticBezierSegment.cs
- Trace.cs
- DataServiceQuery.cs
- DataGridViewRowConverter.cs
- SerializationException.cs
- CodeGotoStatement.cs
- ObjectAnimationBase.cs
- HttpModuleAction.cs
- __Error.cs
- EncoderExceptionFallback.cs
- DbParameterCollectionHelper.cs
- PropertyValueChangedEvent.cs
- base64Transforms.cs
- AdCreatedEventArgs.cs
- PageContent.cs
- ExpressionBuilder.cs
- HotSpot.cs
- ProjectedSlot.cs
- WorkflowRuntimeService.cs
- WorkflowMessageEventArgs.cs
- CodeCatchClause.cs
- ChangeNode.cs
- SynchronizationLockException.cs
- PropertyGridEditorPart.cs
- HttpAsyncResult.cs
- HealthMonitoringSection.cs
- SecurityTokenValidationException.cs
- WindowsScrollBarBits.cs
- PropertyMetadata.cs
- Int32Rect.cs
- SQLDecimalStorage.cs
- DurableInstanceContextProvider.cs
- ProcessInfo.cs
- SqlNotificationRequest.cs
- MessageQueueConverter.cs
- Wildcard.cs
- CodeLinePragma.cs
- CryptoStream.cs
- CompleteWizardStep.cs
- UriTemplateMatchException.cs
- OrderPreservingPipeliningSpoolingTask.cs
- HealthMonitoringSection.cs
- UnsafeNativeMethods.cs
- WebPartCollection.cs
- IsolatedStoragePermission.cs
- TypeSemantics.cs
- AppDomainResourcePerfCounters.cs
- ProfileInfo.cs
- ServiceObjectContainer.cs
- PolicyStatement.cs
- FixedDocumentSequencePaginator.cs
- Message.cs
- WorkflowQueueInfo.cs
- Font.cs
- TargetFrameworkUtil.cs
- BrowserCapabilitiesCompiler.cs
- TreePrinter.cs
- SqlDuplicator.cs
- MissingManifestResourceException.cs
- XPathAncestorIterator.cs
- X509Utils.cs
- ProtocolsConfigurationEntry.cs
- AsymmetricAlgorithm.cs
- WCFModelStrings.Designer.cs
- TagPrefixInfo.cs
- _NegoState.cs
- EntityDataSourceDesigner.cs
- ItemCheckEvent.cs
- CryptographicAttribute.cs
- ServiceInstallComponent.cs
- HttpListenerPrefixCollection.cs
- PropertyFilterAttribute.cs
- MDIClient.cs
- GlyphManager.cs
- PartialTrustVisibleAssemblyCollection.cs
- CollectionViewSource.cs
- ToolStripSeparatorRenderEventArgs.cs
- CheckBoxField.cs
- DirectoryInfo.cs
- ListViewInsertEventArgs.cs
- TextEndOfSegment.cs
- WinInet.cs
- DataGridViewAdvancedBorderStyle.cs
- NativeMethodsOther.cs
- StandardTransformFactory.cs