Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TcpTransportManager.cs
- CustomErrorCollection.cs
- XamlSerializationHelper.cs
- TemplateXamlTreeBuilder.cs
- PageRanges.cs
- StdValidatorsAndConverters.cs
- ContextMenuService.cs
- PointCollectionConverter.cs
- AmbientLight.cs
- TextElementEnumerator.cs
- DataGridRowHeader.cs
- ArgumentDesigner.xaml.cs
- RoleServiceManager.cs
- GridView.cs
- AppAction.cs
- ElementMarkupObject.cs
- Vector3DCollectionConverter.cs
- EditingCoordinator.cs
- ValuePattern.cs
- ServiceObjectContainer.cs
- SoapWriter.cs
- EpmAttributeNameBuilder.cs
- TraceHandlerErrorFormatter.cs
- AudioSignalProblemOccurredEventArgs.cs
- XmlLanguage.cs
- BaseTemplateCodeDomTreeGenerator.cs
- AutoFocusStyle.xaml.cs
- cookiecontainer.cs
- ColumnMapProcessor.cs
- MatchingStyle.cs
- SerializerDescriptor.cs
- HttpModuleCollection.cs
- NamespaceQuery.cs
- ListViewPagedDataSource.cs
- PathStreamGeometryContext.cs
- SmiMetaData.cs
- DataGridColumnEventArgs.cs
- Geometry3D.cs
- CompositionCommandSet.cs
- Reference.cs
- BrowserTree.cs
- UnionExpr.cs
- QilGeneratorEnv.cs
- Merger.cs
- FloatAverageAggregationOperator.cs
- CellTreeNodeVisitors.cs
- DependencyPropertyValueSerializer.cs
- Error.cs
- FlowDocumentView.cs
- DataListItemEventArgs.cs
- DatePickerTextBox.cs
- PolicyValidationException.cs
- RenderDataDrawingContext.cs
- MetadataArtifactLoaderComposite.cs
- DataSetUtil.cs
- CollectionViewGroupInternal.cs
- XmlTypeMapping.cs
- IndicCharClassifier.cs
- OleDbDataReader.cs
- EndOfStreamException.cs
- DynamicValidatorEventArgs.cs
- DbBuffer.cs
- _Semaphore.cs
- XmlText.cs
- BinaryMessageEncodingBindingElement.cs
- ApplicationFileParser.cs
- SectionVisual.cs
- MethodBody.cs
- OrthographicCamera.cs
- BuilderElements.cs
- ScrollData.cs
- VoiceSynthesis.cs
- DecoderExceptionFallback.cs
- OutputCacheProfileCollection.cs
- _HeaderInfoTable.cs
- OleDbPropertySetGuid.cs
- WebResponse.cs
- connectionpool.cs
- CorePropertiesFilter.cs
- SpeechSynthesizer.cs
- NativeRightsManagementAPIsStructures.cs
- ObjectDataSourceMethodEventArgs.cs
- ServicePointManager.cs
- SatelliteContractVersionAttribute.cs
- BinHexEncoder.cs
- RelationshipFixer.cs
- AxHostDesigner.cs
- WebPartDeleteVerb.cs
- XpsViewerException.cs
- HyperLink.cs
- DataRecord.cs
- AnimationClock.cs
- ParentQuery.cs
- TableDetailsCollection.cs
- GZipUtils.cs
- Conditional.cs
- ClientSession.cs
- WebPartConnectionsCancelEventArgs.cs
- Zone.cs
- LinqDataSourceStatusEventArgs.cs