Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- BypassElement.cs
- LabelDesigner.cs
- ObjectSecurity.cs
- ObjectDataSourceFilteringEventArgs.cs
- PropertyKey.cs
- EntityViewGenerationAttribute.cs
- UnknownWrapper.cs
- LedgerEntry.cs
- SettingsAttributes.cs
- QueryableFilterRepeater.cs
- Double.cs
- CommonXSendMessage.cs
- TextMetrics.cs
- WebPartEditorCancelVerb.cs
- CodeLabeledStatement.cs
- FontStretches.cs
- Point4DConverter.cs
- HeaderCollection.cs
- LinqDataSourceContextData.cs
- DeliveryRequirementsAttribute.cs
- DESCryptoServiceProvider.cs
- NodeLabelEditEvent.cs
- CombinedHttpChannel.cs
- IndexedString.cs
- AdornerLayer.cs
- HttpClientCertificate.cs
- GenerateScriptTypeAttribute.cs
- UseLicense.cs
- WebPartDescription.cs
- FontUnitConverter.cs
- PtsPage.cs
- SmtpException.cs
- SrgsItemList.cs
- PerformanceCounter.cs
- XsdValidatingReader.cs
- GeneralTransform3DTo2DTo3D.cs
- TopClause.cs
- DotExpr.cs
- WebPartExportVerb.cs
- CustomTokenProvider.cs
- DependencyPropertyValueSerializer.cs
- PersonalizationProvider.cs
- ExecutedRoutedEventArgs.cs
- DbConnectionPoolGroupProviderInfo.cs
- ReaderWriterLock.cs
- Shared.cs
- ClientSideQueueItem.cs
- SafeViewOfFileHandle.cs
- RelationalExpressions.cs
- PaginationProgressEventArgs.cs
- AppDomainResourcePerfCounters.cs
- Constants.cs
- SendKeys.cs
- KeyManager.cs
- MultiPropertyDescriptorGridEntry.cs
- ClientUrlResolverWrapper.cs
- CustomErrorCollection.cs
- StreamSecurityUpgradeInitiatorBase.cs
- StreamInfo.cs
- FileSystemInfo.cs
- Guid.cs
- Statements.cs
- ImmComposition.cs
- LinkLabelLinkClickedEvent.cs
- DataGridViewButtonCell.cs
- Privilege.cs
- AutomationInteropProvider.cs
- List.cs
- WsdlExporter.cs
- ToolStripDropDownItemDesigner.cs
- Pair.cs
- CodeTypeDelegate.cs
- _ProxyChain.cs
- WebUtil.cs
- RtfFormatStack.cs
- Hex.cs
- WebPartConnectionsDisconnectVerb.cs
- StylusSystemGestureEventArgs.cs
- DynamicAttribute.cs
- odbcmetadatacolumnnames.cs
- WinFormsSecurity.cs
- ParserExtension.cs
- PathFigure.cs
- ApplicationHost.cs
- Deflater.cs
- TrustManager.cs
- KeyedHashAlgorithm.cs
- PropertyGridEditorPart.cs
- DateTimeValueSerializerContext.cs
- CompiledRegexRunnerFactory.cs
- DocumentViewer.cs
- LoginView.cs
- NativeMethods.cs
- SHA256.cs
- SudsCommon.cs
- MessageFormatterConverter.cs
- MembershipValidatePasswordEventArgs.cs
- VisualBrush.cs
- FileDialogCustomPlaces.cs
- SoapCodeExporter.cs