Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- ConfigurationManagerHelper.cs
- NavigationWindow.cs
- Nodes.cs
- TextTreeInsertUndoUnit.cs
- VisualBasicDesignerHelper.cs
- bindurihelper.cs
- DragCompletedEventArgs.cs
- ExpressionEditorAttribute.cs
- QilReference.cs
- ArrayConverter.cs
- CodeBlockBuilder.cs
- VisualTreeUtils.cs
- TileModeValidation.cs
- TrackingParameters.cs
- OutputCacheSettingsSection.cs
- ToolStripButton.cs
- Drawing.cs
- AvTrace.cs
- ASCIIEncoding.cs
- SoapFaultCodes.cs
- ParameterDataSourceExpression.cs
- DataGridRowClipboardEventArgs.cs
- HttpClientCertificate.cs
- PackWebRequestFactory.cs
- DataError.cs
- CellQuery.cs
- AddInActivator.cs
- TypeUtils.cs
- Inflater.cs
- Wizard.cs
- RunWorkerCompletedEventArgs.cs
- Int32AnimationBase.cs
- SerializationObjectManager.cs
- TcpTransportBindingElement.cs
- BitmapEffect.cs
- ListViewItem.cs
- GuidTagList.cs
- ActivityStatusChangeEventArgs.cs
- CleanUpVirtualizedItemEventArgs.cs
- ResourceManagerWrapper.cs
- Page.cs
- FormsAuthenticationUser.cs
- SqlCommandSet.cs
- XmlUrlResolver.cs
- TreePrinter.cs
- SpellerError.cs
- SequentialUshortCollection.cs
- SplitterPanelDesigner.cs
- WindowsAuthenticationModule.cs
- TagPrefixCollection.cs
- ListViewEditEventArgs.cs
- DataAdapter.cs
- EventsTab.cs
- HtmlObjectListAdapter.cs
- Nullable.cs
- ScrollItemPatternIdentifiers.cs
- SerializationObjectManager.cs
- Substitution.cs
- DataGridViewAutoSizeModeEventArgs.cs
- Rectangle.cs
- MenuItem.cs
- WorkflowElementDialog.cs
- ModelTreeManager.cs
- SmtpSection.cs
- WebPartConnection.cs
- EnumerableRowCollectionExtensions.cs
- ProjectionNode.cs
- PageCache.cs
- CompilerError.cs
- WebPartUserCapability.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ArrangedElement.cs
- BufferedReadStream.cs
- WsiProfilesElementCollection.cs
- CapabilitiesState.cs
- EntityModelSchemaGenerator.cs
- DrawingContextWalker.cs
- SoapProtocolReflector.cs
- X509Certificate2.cs
- PropertyPushdownHelper.cs
- MergablePropertyAttribute.cs
- WindowsAltTab.cs
- RightsManagementEncryptedStream.cs
- XmlTextWriter.cs
- AnnotationService.cs
- SHA384.cs
- ClickablePoint.cs
- DbProviderFactoriesConfigurationHandler.cs
- Tablet.cs
- VScrollProperties.cs
- StateMachineHistory.cs
- StylusPointProperty.cs
- ClrProviderManifest.cs
- ConfigXmlAttribute.cs
- Library.cs
- UserControlParser.cs
- ContextMenu.cs
- ToolStripItemImageRenderEventArgs.cs
- EventProviderWriter.cs
- StateManagedCollection.cs