Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / CodeDOM / CodeAttributeDeclaration.cs / 1305376 / CodeAttributeDeclaration.cs
//------------------------------------------------------------------------------ //// // //----------------------------------------------------------------------------- namespace System.CodeDom { using System.Diagnostics; using System; using Microsoft.Win32; using System.Collections; using System.Runtime.InteropServices; using System.Runtime.Serialization; ///[....] // Copyright (c) Microsoft Corporation. All rights reserved. ///// [ 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. /// ///// // //----------------------------------------------------------------------------- namespace System.CodeDom { using System.Diagnostics; using System; using Microsoft.Win32; using System.Collections; using System.Runtime.InteropServices; using System.Runtime.Serialization; ///[....] // Copyright (c) Microsoft Corporation. All rights reserved. ///// [ 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
- Exceptions.cs
- Zone.cs
- PolygonHotSpot.cs
- Stream.cs
- InertiaRotationBehavior.cs
- ImageListStreamer.cs
- InstalledFontCollection.cs
- XmlSchemaImport.cs
- DataSpaceManager.cs
- SafeNativeMethods.cs
- LocalizationCodeDomSerializer.cs
- UnmanagedMarshal.cs
- SelectionHighlightInfo.cs
- SqlWebEventProvider.cs
- VisualCollection.cs
- ExpandoClass.cs
- ClientBuildManagerCallback.cs
- PriorityChain.cs
- ManagedFilter.cs
- ToolStripControlHost.cs
- WebPartEditorOkVerb.cs
- SspiHelper.cs
- ControlCodeDomSerializer.cs
- XmlEntity.cs
- List.cs
- wmiprovider.cs
- ImageCodecInfoPrivate.cs
- SQLGuidStorage.cs
- ExpressionEditorAttribute.cs
- SymbolDocumentInfo.cs
- TreeViewImageKeyConverter.cs
- DetailsViewDeletedEventArgs.cs
- EntityDataSourceDataSelectionPanel.cs
- ExcCanonicalXml.cs
- TryLoadRunnableWorkflowCommand.cs
- RightsManagementEncryptedStream.cs
- MapPathBasedVirtualPathProvider.cs
- WindowHelperService.cs
- Route.cs
- DataGridItem.cs
- _Semaphore.cs
- ErrorFormatter.cs
- WebPartDeleteVerb.cs
- DataGridViewSelectedColumnCollection.cs
- MenuBase.cs
- HuffmanTree.cs
- PolyLineSegment.cs
- KnownAssembliesSet.cs
- ArrayEditor.cs
- OletxCommittableTransaction.cs
- ListView.cs
- RijndaelManagedTransform.cs
- RectValueSerializer.cs
- OutputCacheProfile.cs
- Paragraph.cs
- BaseCodeDomTreeGenerator.cs
- GeometryGroup.cs
- CssClassPropertyAttribute.cs
- arabicshape.cs
- Point3DCollection.cs
- TextElementEditingBehaviorAttribute.cs
- ContainerParaClient.cs
- WindowsHyperlink.cs
- SQLDateTimeStorage.cs
- EditorZoneBase.cs
- StylusCaptureWithinProperty.cs
- HwndKeyboardInputProvider.cs
- SettingsContext.cs
- WebPartTransformer.cs
- FormParameter.cs
- ButtonChrome.cs
- SystemFonts.cs
- TextContainerChangedEventArgs.cs
- XmlCharType.cs
- UpnEndpointIdentityExtension.cs
- RegexStringValidatorAttribute.cs
- Tablet.cs
- TextEmbeddedObject.cs
- ReceiveReply.cs
- StatusBarPanelClickEvent.cs
- WebConfigurationHost.cs
- DataControlPagerLinkButton.cs
- StatusBarPanel.cs
- QueryOpcode.cs
- SchemaTableColumn.cs
- Control.cs
- DBCSCodePageEncoding.cs
- OdbcStatementHandle.cs
- DateTimeFormatInfo.cs
- KernelTypeValidation.cs
- StatusBarPanelClickEvent.cs
- SizeAnimationUsingKeyFrames.cs
- PersonalizationState.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- QilBinary.cs
- DataView.cs
- TypeGeneratedEventArgs.cs
- securitymgrsite.cs
- EntityDataSourceEntitySetNameItem.cs
- PropertyTabAttribute.cs