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
- sortedlist.cs
- Track.cs
- XamlStyleSerializer.cs
- UnsafeNativeMethodsMilCoreApi.cs
- VBIdentifierTrimConverter.cs
- Stream.cs
- DataGridLinkButton.cs
- HtmlElementEventArgs.cs
- Stack.cs
- LogicalExpr.cs
- GenericsNotImplementedException.cs
- PathGradientBrush.cs
- ProxyWebPartManager.cs
- ProfileGroupSettings.cs
- Emitter.cs
- ImmutableClientRuntime.cs
- XmlElementAttributes.cs
- MsmqInputChannelListener.cs
- SessionStateContainer.cs
- JsonWriterDelegator.cs
- OutputCacheSection.cs
- PrintPageEvent.cs
- WindowsToolbar.cs
- ProvidersHelper.cs
- EventListenerClientSide.cs
- Line.cs
- RowVisual.cs
- TransactionContextValidator.cs
- DesignerEventService.cs
- ChtmlLinkAdapter.cs
- MultipartIdentifier.cs
- LockCookie.cs
- DataGridViewRowsRemovedEventArgs.cs
- EncryptedPackage.cs
- ListChunk.cs
- RoleManagerEventArgs.cs
- HttpException.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- MediaContextNotificationWindow.cs
- SqlConnectionString.cs
- DataSourceCache.cs
- ClientRolePrincipal.cs
- TypedOperationInfo.cs
- FamilyCollection.cs
- VectorConverter.cs
- ControlHelper.cs
- DictationGrammar.cs
- securitycriticaldata.cs
- SecurityUtils.cs
- TextDecorationCollectionConverter.cs
- RtType.cs
- DesignSurfaceCollection.cs
- SizeValueSerializer.cs
- RecordBuilder.cs
- OutOfMemoryException.cs
- StaticFileHandler.cs
- SupportingTokenAuthenticatorSpecification.cs
- StyleSheetComponentEditor.cs
- EventLogReader.cs
- GridViewRowPresenter.cs
- ImageBrush.cs
- SqlProvider.cs
- X509CertificateTrustedIssuerElement.cs
- TreeNode.cs
- Int32RectConverter.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- WinCategoryAttribute.cs
- CodeIdentifiers.cs
- ObjectAnimationBase.cs
- dtdvalidator.cs
- FixedTextPointer.cs
- FixedLineResult.cs
- SqlDuplicator.cs
- SmiMetaData.cs
- AssemblyUtil.cs
- AttributeParameterInfo.cs
- SQLRoleProvider.cs
- precedingsibling.cs
- SemaphoreSecurity.cs
- nulltextnavigator.cs
- ComplexLine.cs
- TabletCollection.cs
- SQLDouble.cs
- DataControlImageButton.cs
- ObjectRef.cs
- COM2PropertyDescriptor.cs
- ExceptionUtility.cs
- TrackPoint.cs
- ChannelManagerService.cs
- EditorZoneBase.cs
- ComponentManagerBroker.cs
- DataGridViewCheckBoxCell.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- FieldAccessException.cs
- TdsParameterSetter.cs
- StringResourceManager.cs
- RoleGroupCollection.cs
- RowToFieldTransformer.cs
- StatusBarDrawItemEvent.cs
- CollectionBuilder.cs