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
- PartitionResolver.cs
- WebResourceUtil.cs
- HwndMouseInputProvider.cs
- CodeTryCatchFinallyStatement.cs
- clipboard.cs
- StatusBarDrawItemEvent.cs
- Number.cs
- DataGridClipboardCellContent.cs
- GridViewRowPresenterBase.cs
- LoadedOrUnloadedOperation.cs
- ProxyWebPart.cs
- Section.cs
- WebPermission.cs
- Vector3DIndependentAnimationStorage.cs
- DataControlLinkButton.cs
- VectorCollection.cs
- _SpnDictionary.cs
- WMIGenerator.cs
- KeyInstance.cs
- SoundPlayer.cs
- EdmRelationshipRoleAttribute.cs
- ProxyWebPartManager.cs
- Duration.cs
- IItemContainerGenerator.cs
- CommonRemoteMemoryBlock.cs
- StructuralCache.cs
- HttpApplicationFactory.cs
- Brush.cs
- ClassHandlersStore.cs
- TextCompositionManager.cs
- XPathItem.cs
- MarkupCompilePass1.cs
- storepermissionattribute.cs
- XmlStreamNodeWriter.cs
- SizeFConverter.cs
- XmlUtil.cs
- BackgroundWorker.cs
- GlyphRun.cs
- ServerValidateEventArgs.cs
- InstanceNormalEvent.cs
- TemplateBindingExpressionConverter.cs
- XmlResolver.cs
- NumericExpr.cs
- CatalogZone.cs
- SingleTagSectionHandler.cs
- OutOfProcStateClientManager.cs
- Package.cs
- InputProcessorProfilesLoader.cs
- AssertSection.cs
- PkcsMisc.cs
- ArgumentElement.cs
- sqlstateclientmanager.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- SchemaCollectionPreprocessor.cs
- LabelDesigner.cs
- GridViewSortEventArgs.cs
- Figure.cs
- EntityDataSourceContainerNameItem.cs
- FixedSOMLineRanges.cs
- ApplyTemplatesAction.cs
- DataListItem.cs
- HtmlInputCheckBox.cs
- WindowsSysHeader.cs
- DesignerOptionService.cs
- LocalizationParserHooks.cs
- AuthenticationSection.cs
- dbdatarecord.cs
- TypeGenericEnumerableViewSchema.cs
- SingleStorage.cs
- FormsAuthenticationEventArgs.cs
- DbProviderFactories.cs
- XmlILIndex.cs
- NodeLabelEditEvent.cs
- SecurityException.cs
- HashCodeCombiner.cs
- MouseDevice.cs
- IsolatedStoragePermission.cs
- TextReader.cs
- MultiByteCodec.cs
- SynchronizedDispatch.cs
- QueryOperatorEnumerator.cs
- odbcmetadatacollectionnames.cs
- Operand.cs
- GroupBox.cs
- IUnknownConstantAttribute.cs
- ConstNode.cs
- ExceptionUtil.cs
- CompositeDataBoundControl.cs
- ResXFileRef.cs
- OutputCacheProfileCollection.cs
- WebBaseEventKeyComparer.cs
- MimeXmlReflector.cs
- DataServiceProviderWrapper.cs
- CatalogZoneBase.cs
- HandleValueEditor.cs
- CultureTableRecord.cs
- SqlRowUpdatedEvent.cs
- WorkflowNamespace.cs
- TableItemPattern.cs
- EdmError.cs