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
- GroupStyle.cs
- PlacementWorkspace.cs
- XhtmlBasicPhoneCallAdapter.cs
- HttpModuleAction.cs
- ConsoleKeyInfo.cs
- EventLogRecord.cs
- PrintingPermissionAttribute.cs
- DataSysAttribute.cs
- DataGridViewImageColumn.cs
- GeneralTransform3D.cs
- WebPartCloseVerb.cs
- ThemeDirectoryCompiler.cs
- EntityParameterCollection.cs
- nulltextcontainer.cs
- ExecutionContext.cs
- sqlpipe.cs
- CodeTypeDeclaration.cs
- FillBehavior.cs
- DockPatternIdentifiers.cs
- securestring.cs
- SR.cs
- IListConverters.cs
- ChildDocumentBlock.cs
- PageWrapper.cs
- CodeDelegateInvokeExpression.cs
- ClipboardProcessor.cs
- FixedStringLookup.cs
- documentation.cs
- XmlUtil.cs
- MergeFailedEvent.cs
- WorkflowIdleElement.cs
- MemoryRecordBuffer.cs
- TagPrefixAttribute.cs
- PropertyGridEditorPart.cs
- wgx_sdk_version.cs
- ButtonRenderer.cs
- FormatterConverter.cs
- BitmapDownload.cs
- NodeLabelEditEvent.cs
- embossbitmapeffect.cs
- Image.cs
- BaseParaClient.cs
- SystemEvents.cs
- StreamResourceInfo.cs
- Update.cs
- DialogResultConverter.cs
- DocumentViewerBase.cs
- ReflectionUtil.cs
- HtmlContainerControl.cs
- IssuedTokensHeader.cs
- odbcmetadatacollectionnames.cs
- ConnectionPoint.cs
- Win32SafeHandles.cs
- RealizationContext.cs
- XmlQuerySequence.cs
- DataException.cs
- AdCreatedEventArgs.cs
- RegexCompiler.cs
- ConfigXmlElement.cs
- WorkflowDispatchContext.cs
- IdentifierService.cs
- PipeStream.cs
- StoreConnection.cs
- ReadOnlyAttribute.cs
- HorizontalAlignConverter.cs
- LocalizationParserHooks.cs
- OrderedDictionaryStateHelper.cs
- FieldDescriptor.cs
- ObjectDataSourceFilteringEventArgs.cs
- XmlSchemaDocumentation.cs
- HierarchicalDataSourceIDConverter.cs
- Int16KeyFrameCollection.cs
- ListMarkerSourceInfo.cs
- XamlParser.cs
- DataQuery.cs
- FilteredReadOnlyMetadataCollection.cs
- StreamWithDictionary.cs
- EmbeddedMailObject.cs
- DataGrid.cs
- HttpServerVarsCollection.cs
- EncoderFallback.cs
- HashAlgorithm.cs
- WebBrowserNavigatingEventHandler.cs
- SynchronizationFilter.cs
- SimpleRecyclingCache.cs
- SafeFileMappingHandle.cs
- GridItemProviderWrapper.cs
- HttpRuntime.cs
- KeyMatchBuilder.cs
- TemplateBuilder.cs
- COM2IPerPropertyBrowsingHandler.cs
- UniqueIdentifierService.cs
- XamlValidatingReader.cs
- InputLangChangeRequestEvent.cs
- Queue.cs
- GradientSpreadMethodValidation.cs
- ColorConvertedBitmap.cs
- validation.cs
- ProvideValueServiceProvider.cs
- QilStrConcat.cs