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
- GestureRecognizer.cs
- WebPartConnectionsEventArgs.cs
- SlotInfo.cs
- X509Certificate2Collection.cs
- DataShape.cs
- ColorConverter.cs
- DiscreteKeyFrames.cs
- TextDecorationLocationValidation.cs
- Label.cs
- ReflectionPermission.cs
- httpapplicationstate.cs
- DataGridCheckBoxColumn.cs
- UnsafeNativeMethods.cs
- RowVisual.cs
- TextElementEnumerator.cs
- EmbeddedObject.cs
- ColorIndependentAnimationStorage.cs
- XmlCharType.cs
- ApplicationInfo.cs
- CompiledIdentityConstraint.cs
- DataGridViewSortCompareEventArgs.cs
- ToolboxComponentsCreatingEventArgs.cs
- XpsPackagingPolicy.cs
- PostBackOptions.cs
- PrivilegeNotHeldException.cs
- SapiInterop.cs
- Vertex.cs
- SqlNamer.cs
- Point4DValueSerializer.cs
- HtmlForm.cs
- HttpTransportBindingElement.cs
- SqlException.cs
- XmlILAnnotation.cs
- WebPartCatalogCloseVerb.cs
- BamlRecordWriter.cs
- Command.cs
- EditingCommands.cs
- ConnectAlgorithms.cs
- ChannelBase.cs
- FtpRequestCacheValidator.cs
- TraceSource.cs
- ICollection.cs
- Int16Storage.cs
- x509store.cs
- WebControlParameterProxy.cs
- DataGridViewLinkCell.cs
- ListInitExpression.cs
- HTTPNotFoundHandler.cs
- XpsS0ValidatingLoader.cs
- MatrixCamera.cs
- Transform3DGroup.cs
- WmpBitmapDecoder.cs
- ServiceMetadataExtension.cs
- ZoneMembershipCondition.cs
- JulianCalendar.cs
- FileClassifier.cs
- AudioDeviceOut.cs
- BasicExpandProvider.cs
- SourceFileBuildProvider.cs
- SqlDataSourceTableQuery.cs
- PageSetupDialog.cs
- SqlDataReaderSmi.cs
- NamespaceDecl.cs
- OracleNumber.cs
- CommonXSendMessage.cs
- FocusWithinProperty.cs
- WorkflowRuntimeService.cs
- CompilerResults.cs
- ProtocolImporter.cs
- RootBrowserWindowAutomationPeer.cs
- DataKeyArray.cs
- TableItemPatternIdentifiers.cs
- ConvertEvent.cs
- MemberHolder.cs
- EntityClientCacheEntry.cs
- XmlQueryStaticData.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- LookupBindingPropertiesAttribute.cs
- MobileCapabilities.cs
- DataGridViewSelectedRowCollection.cs
- HandleCollector.cs
- SizeAnimation.cs
- _BufferOffsetSize.cs
- WebPartMovingEventArgs.cs
- MulticastOption.cs
- Accessors.cs
- ExclusiveTcpListener.cs
- UpdateProgress.cs
- EnterpriseServicesHelper.cs
- ColorAnimationBase.cs
- CollectionChangeEventArgs.cs
- AttachedPropertiesService.cs
- PageParserFilter.cs
- ServiceHostingEnvironment.cs
- _OSSOCK.cs
- GridViewCellAutomationPeer.cs
- SpanIndex.cs
- ObjectSecurityT.cs
- ProcessThreadDesigner.cs
- WorkflowRuntimeService.cs