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
- ConfigXmlCDataSection.cs
- COM2ColorConverter.cs
- ColumnClickEvent.cs
- TransactionOptions.cs
- GZipObjectSerializer.cs
- Certificate.cs
- Rules.cs
- TextSelection.cs
- WorkflowTransactionService.cs
- StrokeSerializer.cs
- activationcontext.cs
- WebHttpDispatchOperationSelectorData.cs
- CrossAppDomainChannel.cs
- InvalidDocumentContentsException.cs
- ConnectionStringEditor.cs
- ExpressionPrinter.cs
- StateBag.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- IconBitmapDecoder.cs
- FragmentNavigationEventArgs.cs
- WebConfigurationHost.cs
- LedgerEntryCollection.cs
- MetadataArtifactLoaderFile.cs
- TemplatedAdorner.cs
- DateTimePickerDesigner.cs
- TextTreeTextElementNode.cs
- DataGridTextBoxColumn.cs
- XmlSchemaObjectCollection.cs
- ToolStripDropDown.cs
- SettingsAttributeDictionary.cs
- FormView.cs
- SetterBase.cs
- State.cs
- SymLanguageVendor.cs
- XmlCountingReader.cs
- ToolStripInSituService.cs
- TargetException.cs
- ToggleButton.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ListenerElementsCollection.cs
- DataSourceHelper.cs
- Policy.cs
- ByteAnimationUsingKeyFrames.cs
- TemplateBindingExtensionConverter.cs
- CompilerGeneratedAttribute.cs
- DiscriminatorMap.cs
- PropertyDescriptorCollection.cs
- Flowchart.cs
- ReplyAdapterChannelListener.cs
- AudioDeviceOut.cs
- SafeArrayRankMismatchException.cs
- figurelength.cs
- ProxyWebPartConnectionCollection.cs
- TempEnvironment.cs
- AttributeExtensions.cs
- OracleMonthSpan.cs
- HttpModuleActionCollection.cs
- XPathNode.cs
- Mapping.cs
- UniqueTransportManagerRegistration.cs
- XamlRtfConverter.cs
- AffineTransform3D.cs
- NavigationWindow.cs
- ZeroOpNode.cs
- SecurityPolicySection.cs
- Update.cs
- LOSFormatter.cs
- CTreeGenerator.cs
- FixedSOMTextRun.cs
- Model3DGroup.cs
- QueuePathDialog.cs
- TrueReadOnlyCollection.cs
- ItemsControl.cs
- SqlVersion.cs
- AspNetSynchronizationContext.cs
- SHA384Managed.cs
- HitTestParameters.cs
- Compress.cs
- XmlValidatingReader.cs
- HttpContextServiceHost.cs
- DataBindingHandlerAttribute.cs
- CannotUnloadAppDomainException.cs
- altserialization.cs
- RadioButtonRenderer.cs
- StringCollection.cs
- DBSqlParserTableCollection.cs
- FileNotFoundException.cs
- BinaryKeyIdentifierClause.cs
- ControlBuilderAttribute.cs
- Soap.cs
- XmlWellformedWriter.cs
- DbProviderManifest.cs
- FixedHyperLink.cs
- XmlName.cs
- PassportPrincipal.cs
- VisualBasicValue.cs
- SHA384.cs
- ServiceContractViewControl.Designer.cs
- isolationinterop.cs
- newinstructionaction.cs