Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / CodeDOM / CodeAttributeDeclaration.cs / 1305376 / CodeAttributeDeclaration.cs
//------------------------------------------------------------------------------ //// // //----------------------------------------------------------------------------- namespace System.CodeDom { using System.Diagnostics; using System; using Microsoft.Win32; using System.Collections; using System.Runtime.InteropServices; using System.Runtime.Serialization; ///[....] // Copyright (c) Microsoft Corporation. All rights reserved. ///// [ 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
- MulticastIPAddressInformationCollection.cs
- Bezier.cs
- TableLayoutPanel.cs
- ProcessProtocolHandler.cs
- FixedPageAutomationPeer.cs
- XmlObjectSerializerWriteContextComplex.cs
- ByteConverter.cs
- SchemaSetCompiler.cs
- EntityContainerEntitySetDefiningQuery.cs
- MaterialCollection.cs
- ScriptServiceAttribute.cs
- MouseEventArgs.cs
- ChildDocumentBlock.cs
- DocumentPage.cs
- WizardPanelChangingEventArgs.cs
- FormatException.cs
- BindingSourceDesigner.cs
- OutputCacheSettings.cs
- TriggerActionCollection.cs
- ISAPIApplicationHost.cs
- MatrixAnimationUsingKeyFrames.cs
- Compilation.cs
- webeventbuffer.cs
- BufferedGraphics.cs
- CorrelationTokenTypeConvertor.cs
- SQLInt16Storage.cs
- SocketElement.cs
- BitmapCache.cs
- DecoderBestFitFallback.cs
- MenuBase.cs
- ObjectListSelectEventArgs.cs
- Model3DGroup.cs
- ProtocolsConfigurationHandler.cs
- DbDataAdapter.cs
- Rect3DValueSerializer.cs
- TextTreeTextBlock.cs
- List.cs
- RunClient.cs
- IdentityModelDictionary.cs
- DataServiceSaveChangesEventArgs.cs
- IntSumAggregationOperator.cs
- ReflectEventDescriptor.cs
- ShowExpandedMultiValueConverter.cs
- SafeReadContext.cs
- OdbcCommandBuilder.cs
- ColumnWidthChangingEvent.cs
- ValidationContext.cs
- IPEndPoint.cs
- PersonalizationAdministration.cs
- SerializationObjectManager.cs
- QuerySetOp.cs
- ServiceModelEnumValidator.cs
- Int32Converter.cs
- CompoundFileIOPermission.cs
- SystemWebCachingSectionGroup.cs
- SafeBitVector32.cs
- DataBoundControlAdapter.cs
- XmlNamespaceMappingCollection.cs
- StoreItemCollection.Loader.cs
- XMLSchema.cs
- ToolStripInSituService.cs
- DispatcherObject.cs
- cookiecontainer.cs
- PenContext.cs
- DummyDataSource.cs
- BitArray.cs
- AuthenticationConfig.cs
- WebPartMenu.cs
- ObjectDataSourceSelectingEventArgs.cs
- AuthorizationRule.cs
- NeedSkipTokenVisitor.cs
- ExtractCollection.cs
- ProfileModule.cs
- SynchronousSendBindingElement.cs
- SelectionRangeConverter.cs
- TimeSpanValidator.cs
- AncillaryOps.cs
- QilCloneVisitor.cs
- DebuggerAttributes.cs
- DataGridViewDataErrorEventArgs.cs
- ExpressionBindings.cs
- BindToObject.cs
- XmlQualifiedName.cs
- TransactionTable.cs
- ISFTagAndGuidCache.cs
- CqlErrorHelper.cs
- TextServicesCompartmentContext.cs
- TabControlCancelEvent.cs
- SimpleRecyclingCache.cs
- XslException.cs
- ConsumerConnectionPoint.cs
- CodeMethodReturnStatement.cs
- XmlArrayAttribute.cs
- DataGridGeneralPage.cs
- ClientTargetCollection.cs
- TableParagraph.cs
- CodePageUtils.cs
- XmlTypeMapping.cs
- XmlSignificantWhitespace.cs
- PartialCachingAttribute.cs