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
- SystemInformation.cs
- WindowsSpinner.cs
- CDSCollectionETWBCLProvider.cs
- NamespaceEmitter.cs
- DrawingContextDrawingContextWalker.cs
- XmlCharCheckingWriter.cs
- WebPartConnectionsCancelEventArgs.cs
- AccessViolationException.cs
- EventData.cs
- StringUtil.cs
- DataObjectEventArgs.cs
- ColumnResult.cs
- DecimalAverageAggregationOperator.cs
- AnnotationAdorner.cs
- TrustSection.cs
- OdbcConnectionFactory.cs
- WebPartManagerInternals.cs
- DesignTimeTemplateParser.cs
- SystemIPAddressInformation.cs
- CheckBoxField.cs
- TableCellAutomationPeer.cs
- TimerElapsedEvenArgs.cs
- StringSource.cs
- ResponseBodyWriter.cs
- ScriptManager.cs
- SQLDateTimeStorage.cs
- CodeMemberMethod.cs
- IntranetCredentialPolicy.cs
- uribuilder.cs
- Point.cs
- FtpWebResponse.cs
- Decoder.cs
- X509Certificate2Collection.cs
- EntityTemplateUserControl.cs
- PeerTransportCredentialType.cs
- CodeParameterDeclarationExpressionCollection.cs
- DataColumn.cs
- XmlBufferReader.cs
- OdbcCommandBuilder.cs
- UInt32.cs
- QilList.cs
- CallbackValidator.cs
- FlowDocumentScrollViewer.cs
- DBSqlParserColumn.cs
- FreezableCollection.cs
- GroupStyle.cs
- HtmlInputCheckBox.cs
- X509InitiatorCertificateClientElement.cs
- EditorPart.cs
- StrongNameMembershipCondition.cs
- prompt.cs
- PenThreadWorker.cs
- MatrixValueSerializer.cs
- BitmapData.cs
- ArrayConverter.cs
- ChannelProtectionRequirements.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- XmlSchemaAppInfo.cs
- Splitter.cs
- HtmlForm.cs
- MetadataItem_Static.cs
- StyleSheet.cs
- Formatter.cs
- OrderedDictionaryStateHelper.cs
- DynamicDataRoute.cs
- WebControlParameterProxy.cs
- DocumentViewerBase.cs
- GcHandle.cs
- ImageField.cs
- BuildTopDownAttribute.cs
- ContextMenu.cs
- SmiSettersStream.cs
- EditorPartCollection.cs
- ServiceElement.cs
- LazyTextWriterCreator.cs
- XsltConvert.cs
- RawAppCommandInputReport.cs
- GlobalEventManager.cs
- SrgsElementFactoryCompiler.cs
- XamlVector3DCollectionSerializer.cs
- SafeFileHandle.cs
- Journal.cs
- Regex.cs
- ActivityTypeCodeDomSerializer.cs
- FillErrorEventArgs.cs
- KeysConverter.cs
- NameService.cs
- DtdParser.cs
- Reference.cs
- SecUtil.cs
- HyperLink.cs
- QueryRewriter.cs
- ScalarOps.cs
- NewArrayExpression.cs
- webclient.cs
- WebPartEventArgs.cs
- ServiceOperationParameter.cs
- SqlDataSource.cs
- QueryInterceptorAttribute.cs
- AbandonedMutexException.cs