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
- GridViewUpdatedEventArgs.cs
- DictionaryEditChange.cs
- CustomAttributeFormatException.cs
- MappingModelBuildProvider.cs
- ValidationErrorEventArgs.cs
- XPathItem.cs
- XmlSchemaAnyAttribute.cs
- ConvertBinder.cs
- XmlProcessingInstruction.cs
- XamlSerializerUtil.cs
- SystemShuttingDownException.cs
- SID.cs
- ColorTransform.cs
- ClientFormsAuthenticationCredentials.cs
- SetIterators.cs
- FileDataSourceCache.cs
- SystemPens.cs
- SynchronizationContext.cs
- WebServicesSection.cs
- AnnotationResource.cs
- FixedNode.cs
- DataGridViewSelectedRowCollection.cs
- AdvancedBindingPropertyDescriptor.cs
- XmlTextAttribute.cs
- GeneralTransform2DTo3D.cs
- GPPOINTF.cs
- AssemblyName.cs
- PageCatalogPart.cs
- GZipStream.cs
- XmlSortKeyAccumulator.cs
- ChannelManager.cs
- AQNBuilder.cs
- NetworkStream.cs
- PrintSystemException.cs
- GridViewDeleteEventArgs.cs
- PartBasedPackageProperties.cs
- ArrangedElement.cs
- XmlAtomicValue.cs
- TextEditorTables.cs
- ReflectionTypeLoadException.cs
- ErrorHandler.cs
- Timer.cs
- MethodBody.cs
- ServiceOperationWrapper.cs
- WpfKnownMemberInvoker.cs
- FrameDimension.cs
- SafeViewOfFileHandle.cs
- ManifestBasedResourceGroveler.cs
- FlowPosition.cs
- SecurityUtils.cs
- GenericAuthenticationEventArgs.cs
- _LocalDataStore.cs
- MediaPlayerState.cs
- ListViewTableCell.cs
- FileDialogCustomPlace.cs
- Set.cs
- DataGridViewComboBoxEditingControl.cs
- SmiEventSink_Default.cs
- DataControlFieldCollection.cs
- TabControlDesigner.cs
- DataGridViewRowConverter.cs
- BufferedWebEventProvider.cs
- oledbmetadatacolumnnames.cs
- DeflateStream.cs
- DummyDataSource.cs
- XmlQuerySequence.cs
- MouseBinding.cs
- odbcmetadatafactory.cs
- Command.cs
- ImpersonationContext.cs
- Span.cs
- SessionParameter.cs
- ServiceCredentialsElement.cs
- GradientStop.cs
- Atom10ItemFormatter.cs
- BufferedGraphicsContext.cs
- EditorZoneAutoFormat.cs
- InvokePatternIdentifiers.cs
- StackOverflowException.cs
- Tracer.cs
- SafeSecurityHelper.cs
- XmlConvert.cs
- PageParser.cs
- VarInfo.cs
- ThumbAutomationPeer.cs
- VariableBinder.cs
- EndpointIdentityConverter.cs
- CodeTypeReferenceExpression.cs
- CacheChildrenQuery.cs
- NativeCppClassAttribute.cs
- XmlSchemaComplexContentRestriction.cs
- ExternalException.cs
- FileIOPermission.cs
- Method.cs
- ZipPackagePart.cs
- FormViewRow.cs
- StylusDevice.cs
- ErrorFormatterPage.cs
- DataTableReaderListener.cs
- SchemaComplexType.cs