Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- CreateUserWizardStep.cs
- listitem.cs
- RuntimeHandles.cs
- AbstractDataSvcMapFileLoader.cs
- ObjectIDGenerator.cs
- HealthMonitoringSection.cs
- Registry.cs
- _NetRes.cs
- PanelDesigner.cs
- OperationAbortedException.cs
- Metadata.cs
- OleDbParameterCollection.cs
- BaseHashHelper.cs
- VerificationException.cs
- FocusChangedEventArgs.cs
- OdbcPermission.cs
- GenericsInstances.cs
- XmlQueryRuntime.cs
- ToolConsole.cs
- Utilities.cs
- TypeConverter.cs
- DataServiceRequest.cs
- StartFileNameEditor.cs
- httpserverutility.cs
- VsPropertyGrid.cs
- HealthMonitoringSectionHelper.cs
- OrderedEnumerableRowCollection.cs
- CodeDOMUtility.cs
- EventProvider.cs
- ObjectQueryExecutionPlan.cs
- MenuItemBinding.cs
- TrustManagerMoreInformation.cs
- DelayedRegex.cs
- FontStyleConverter.cs
- XPathQueryGenerator.cs
- XmlWriterSettings.cs
- EventLogConfiguration.cs
- CodeMethodReturnStatement.cs
- ActiveXHost.cs
- SafeMarshalContext.cs
- BitmapDownload.cs
- ModifiableIteratorCollection.cs
- VectorAnimation.cs
- Floater.cs
- __TransparentProxy.cs
- ContainerUIElement3D.cs
- TextFormatter.cs
- WebEventCodes.cs
- EncoderParameters.cs
- QilUnary.cs
- ClientUrlResolverWrapper.cs
- BaseProcessor.cs
- CategoryAttribute.cs
- HtmlLiteralTextAdapter.cs
- FilteredDataSetHelper.cs
- LinqDataSourceValidationException.cs
- PinnedBufferMemoryStream.cs
- FontSizeConverter.cs
- Manipulation.cs
- HttpProfileGroupBase.cs
- DataServiceQueryException.cs
- FilterQuery.cs
- ElementProxy.cs
- GlyphRunDrawing.cs
- ImageBrush.cs
- ConstantSlot.cs
- FlowLayoutPanel.cs
- AttributeUsageAttribute.cs
- ConfigurationStrings.cs
- XpsS0ValidatingLoader.cs
- DeploymentSectionCache.cs
- ListControl.cs
- UiaCoreProviderApi.cs
- Mappings.cs
- TransactionFilter.cs
- GetWinFXPath.cs
- DataGridItemCollection.cs
- Translator.cs
- ListViewGroupItemCollection.cs
- ListViewGroupConverter.cs
- CustomCategoryAttribute.cs
- ComponentCollection.cs
- AssemblyNameProxy.cs
- Latin1Encoding.cs
- WindowsScrollBar.cs
- ContainerUtilities.cs
- Size3D.cs
- PropertyItemInternal.cs
- AsyncResult.cs
- ToggleProviderWrapper.cs
- ScrollContentPresenter.cs
- SafeFileMappingHandle.cs
- HandleCollector.cs
- ACE.cs
- DataGridViewBindingCompleteEventArgs.cs
- CapabilitiesRule.cs
- SqlDelegatedTransaction.cs
- ValidatorCollection.cs
- CodeLinePragma.cs
- AvTraceFormat.cs