Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// The arguments for the attribute. /// ///// 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; } } } } // 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
- InputProviderSite.cs
- ValueTypeFieldReference.cs
- XmlSiteMapProvider.cs
- OdbcStatementHandle.cs
- HtmlElementErrorEventArgs.cs
- TreeChangeInfo.cs
- MonitoringDescriptionAttribute.cs
- HyperLinkStyle.cs
- ConditionalExpression.cs
- TimeoutException.cs
- XamlReaderHelper.cs
- UrlAuthorizationModule.cs
- TraceContextEventArgs.cs
- WebConfigurationManager.cs
- OrderByBuilder.cs
- AppSettingsExpressionEditor.cs
- TraceContextEventArgs.cs
- MethodBuilder.cs
- RequestCacheManager.cs
- Helpers.cs
- DrawingDrawingContext.cs
- LabelDesigner.cs
- InputScopeConverter.cs
- FrameworkTemplate.cs
- DigestComparer.cs
- WorkItem.cs
- PropertySourceInfo.cs
- Console.cs
- DataGridPageChangedEventArgs.cs
- FixedSOMGroup.cs
- SessionStateSection.cs
- ExternalDataExchangeClient.cs
- OleDbCommand.cs
- oledbconnectionstring.cs
- ButtonBase.cs
- TextTreeTextBlock.cs
- Freezable.cs
- Calendar.cs
- EnumerableCollectionView.cs
- _CacheStreams.cs
- X509Utils.cs
- EditBehavior.cs
- CodeTypeReferenceExpression.cs
- XmlSerializerSection.cs
- Set.cs
- DbConnectionPoolCounters.cs
- GenericWebPart.cs
- ApplyHostConfigurationBehavior.cs
- PostBackOptions.cs
- ToolTipService.cs
- AsyncCompletedEventArgs.cs
- SqlInternalConnection.cs
- XPathChildIterator.cs
- DebugHandleTracker.cs
- TextLineResult.cs
- CustomErrorsSection.cs
- HopperCache.cs
- TextPattern.cs
- TransformedBitmap.cs
- HtmlWindow.cs
- SamlConstants.cs
- DisposableCollectionWrapper.cs
- GraphicsPathIterator.cs
- LayoutTable.cs
- DocumentSequence.cs
- DrawingServices.cs
- Wow64ConfigurationLoader.cs
- WpfXamlType.cs
- LinearQuaternionKeyFrame.cs
- SmtpReplyReaderFactory.cs
- XmlQueryType.cs
- MessageQueuePermissionEntry.cs
- SessionParameter.cs
- HttpCookieCollection.cs
- DataQuery.cs
- WindowsTokenRoleProvider.cs
- DataGridHelper.cs
- ModelService.cs
- ServicePoint.cs
- HostingPreferredMapPath.cs
- PropertyIdentifier.cs
- DownloadProgressEventArgs.cs
- MetadataException.cs
- EnvelopedPkcs7.cs
- SafeCryptHandles.cs
- ToolstripProfessionalRenderer.cs
- SerializationObjectManager.cs
- Visual.cs
- MultiPartWriter.cs
- TableParaClient.cs
- ServiceOperation.cs
- BitmapEffectCollection.cs
- precedingsibling.cs
- AutoScrollExpandMessageFilter.cs
- ProfileGroupSettingsCollection.cs
- Label.cs
- ReadOnlyPropertyMetadata.cs
- ContentIterators.cs
- DbBuffer.cs
- BitmapDecoder.cs