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
- Queue.cs
- WhitespaceSignificantCollectionAttribute.cs
- SQLByte.cs
- ToolStripAdornerWindowService.cs
- FileInfo.cs
- ResourceReferenceExpression.cs
- SignerInfo.cs
- Link.cs
- XXXOnTypeBuilderInstantiation.cs
- ScopedMessagePartSpecification.cs
- WpfKnownType.cs
- ForceCopyBuildProvider.cs
- RemoteWebConfigurationHostServer.cs
- URI.cs
- HtmlForm.cs
- PreloadedPackages.cs
- ParameterBuilder.cs
- Cloud.cs
- OracleBoolean.cs
- ADConnectionHelper.cs
- EditingCoordinator.cs
- StructuralType.cs
- HtmlWindowCollection.cs
- SqlTopReducer.cs
- TypeGeneratedEventArgs.cs
- TemplatePagerField.cs
- UnknownBitmapEncoder.cs
- ObjectStateEntry.cs
- CopyOnWriteList.cs
- DataGridViewBand.cs
- ConfigurationElementProperty.cs
- FormsAuthenticationConfiguration.cs
- CompositeDispatchFormatter.cs
- PartialCachingAttribute.cs
- InstanceStore.cs
- baseaxisquery.cs
- httpapplicationstate.cs
- HandleRef.cs
- RoleBoolean.cs
- SqlMethodTransformer.cs
- SqlClientMetaDataCollectionNames.cs
- X509Utils.cs
- TdsParserStateObject.cs
- TemplateKeyConverter.cs
- XmlDataCollection.cs
- FunctionImportElement.cs
- PageCodeDomTreeGenerator.cs
- WindowPatternIdentifiers.cs
- HtmlContainerControl.cs
- XmlQualifiedNameTest.cs
- Graphics.cs
- ExclusiveHandleList.cs
- TextParagraphCache.cs
- RelationshipConverter.cs
- BuildResultCache.cs
- ParamArrayAttribute.cs
- XpsS0ValidatingLoader.cs
- CodeCommentStatementCollection.cs
- OutputScope.cs
- XmlArrayItemAttributes.cs
- BaseTreeIterator.cs
- DataGridViewColumnStateChangedEventArgs.cs
- XslNumber.cs
- OutputScopeManager.cs
- DecimalConverter.cs
- ClientType.cs
- DataGridTextBoxColumn.cs
- DataListCommandEventArgs.cs
- TextSearch.cs
- PeerToPeerException.cs
- ObjectContextServiceProvider.cs
- ColorMap.cs
- RequestSecurityToken.cs
- ValidationRuleCollection.cs
- FilterableData.cs
- SoundPlayerAction.cs
- EntityModelBuildProvider.cs
- Application.cs
- WebPartManagerInternals.cs
- XmlBaseWriter.cs
- WebPartEditorApplyVerb.cs
- infer.cs
- BitmapCodecInfoInternal.cs
- ColorConverter.cs
- TypeLoadException.cs
- CodeGenerationManager.cs
- TaskbarItemInfo.cs
- PageHandlerFactory.cs
- SeverityFilter.cs
- MatrixKeyFrameCollection.cs
- NTAccount.cs
- MethodRental.cs
- BamlLocalizableResource.cs
- EditBehavior.cs
- PageWrapper.cs
- XsdBuilder.cs
- IdentityHolder.cs
- shaperfactoryquerycachekey.cs
- querybuilder.cs
- IntPtr.cs