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
- Subordinate.cs
- LiteralControl.cs
- Converter.cs
- MethodImplAttribute.cs
- ToolStripHighContrastRenderer.cs
- ZipPackage.cs
- BinaryKeyIdentifierClause.cs
- GregorianCalendarHelper.cs
- SmiRecordBuffer.cs
- FloaterBaseParagraph.cs
- Label.cs
- SortedSet.cs
- MailAddressCollection.cs
- SystemIPInterfaceStatistics.cs
- UnauthorizedAccessException.cs
- XmlWrappingWriter.cs
- ObjectStateFormatter.cs
- ValueCollectionParameterReader.cs
- MouseActionConverter.cs
- ObsoleteAttribute.cs
- FullTextBreakpoint.cs
- XPathScanner.cs
- PageParserFilter.cs
- SQLDoubleStorage.cs
- ManagedCodeMarkers.cs
- TemplateComponentConnector.cs
- GridViewAutoFormat.cs
- WebPartDescription.cs
- StreamUpgradeInitiator.cs
- GridViewAutoFormat.cs
- ProcessHostMapPath.cs
- RequestQueue.cs
- ConfigUtil.cs
- EventLogEntry.cs
- DataGridViewCellParsingEventArgs.cs
- TCPClient.cs
- ItemsChangedEventArgs.cs
- RemotingConfigParser.cs
- ContainerUtilities.cs
- KeyValueInternalCollection.cs
- Trace.cs
- TextCompositionEventArgs.cs
- ReadOnlyTernaryTree.cs
- SafeReadContext.cs
- CapabilitiesUse.cs
- StringSorter.cs
- uribuilder.cs
- BatchParser.cs
- ItemsPanelTemplate.cs
- ResponseStream.cs
- HttpListenerContext.cs
- OdbcConnectionStringbuilder.cs
- DefaultValueTypeConverter.cs
- Soap.cs
- EncryptRequest.cs
- DataContract.cs
- Duration.cs
- LabelDesigner.cs
- MailAddressParser.cs
- BitmapEffectInput.cs
- AuthenticationSection.cs
- DataGridAutoFormat.cs
- MailWebEventProvider.cs
- AxisAngleRotation3D.cs
- MetroSerializationManager.cs
- QueryCreatedEventArgs.cs
- SessionPageStatePersister.cs
- listitem.cs
- BitmapEffectDrawing.cs
- FormsAuthenticationUser.cs
- TcpSocketManager.cs
- AutomationPattern.cs
- CursorConverter.cs
- StringDictionary.cs
- ListenerElementsCollection.cs
- TemplatedWizardStep.cs
- Page.cs
- Operand.cs
- SqlVersion.cs
- UserValidatedEventArgs.cs
- ConnectionManagementElement.cs
- CustomAssemblyResolver.cs
- CommandID.cs
- SoapExtensionImporter.cs
- ReadOnlyDataSource.cs
- RawKeyboardInputReport.cs
- WebPartChrome.cs
- Stacktrace.cs
- FtpWebRequest.cs
- DoubleSumAggregationOperator.cs
- ConfigurationSection.cs
- assertwrapper.cs
- CharConverter.cs
- MatrixKeyFrameCollection.cs
- DesignerGeometryHelper.cs
- DbConnectionPool.cs
- XmlWriterSettings.cs
- Ref.cs
- EDesignUtil.cs
- CaseInsensitiveComparer.cs