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
- SafeNativeMethodsMilCoreApi.cs
- DSASignatureDeformatter.cs
- WindowsRichEdit.cs
- SecurityResources.cs
- IProvider.cs
- FunctionParameter.cs
- SchemaImporter.cs
- SystemThemeKey.cs
- UdpChannelFactory.cs
- ClientTargetCollection.cs
- AddingNewEventArgs.cs
- PersistenceException.cs
- MouseOverProperty.cs
- WorkflowHostingResponseContext.cs
- ModelTreeManager.cs
- AssemblyNameUtility.cs
- OletxEnlistment.cs
- TemplatedMailWebEventProvider.cs
- MasterPageBuildProvider.cs
- CompiledRegexRunnerFactory.cs
- XmlCharCheckingWriter.cs
- PassportAuthenticationEventArgs.cs
- ServerValidateEventArgs.cs
- RequestDescription.cs
- RecordsAffectedEventArgs.cs
- ApplicationInfo.cs
- ValueQuery.cs
- SmtpReplyReaderFactory.cs
- XmlEventCache.cs
- MethodExpression.cs
- GACMembershipCondition.cs
- FrameworkObject.cs
- CompressedStack.cs
- ColorConvertedBitmapExtension.cs
- SpanIndex.cs
- WebPartManager.cs
- UnionCodeGroup.cs
- EmbossBitmapEffect.cs
- XmlQuerySequence.cs
- DictionaryEntry.cs
- CodeFieldReferenceExpression.cs
- Membership.cs
- PathFigureCollection.cs
- SchemaExporter.cs
- FrameDimension.cs
- ValidationEventArgs.cs
- RectangleHotSpot.cs
- ObjectDataSourceDisposingEventArgs.cs
- ValueType.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- NameNode.cs
- XslAst.cs
- DataTableReaderListener.cs
- FunctionParameter.cs
- SqlUdtInfo.cs
- PasswordBox.cs
- AsymmetricKeyExchangeFormatter.cs
- WebPartConnectionsCloseVerb.cs
- UnsafeNetInfoNativeMethods.cs
- DocumentPageViewAutomationPeer.cs
- DataObjectEventArgs.cs
- SystemIPv6InterfaceProperties.cs
- MemoryResponseElement.cs
- PeerCollaboration.cs
- CngKeyBlobFormat.cs
- TransformGroup.cs
- SqlTriggerAttribute.cs
- SmtpFailedRecipientsException.cs
- HttpDebugHandler.cs
- StrokeDescriptor.cs
- DataGridBeginningEditEventArgs.cs
- COSERVERINFO.cs
- QueryParameter.cs
- CodeTypeReferenceCollection.cs
- CurrentChangingEventManager.cs
- MasterPageCodeDomTreeGenerator.cs
- LongSumAggregationOperator.cs
- SiteMapSection.cs
- FormViewInsertEventArgs.cs
- GacUtil.cs
- SoapHeaders.cs
- WebServiceClientProxyGenerator.cs
- PeerTransportListenAddressValidator.cs
- DataSpaceManager.cs
- ParseNumbers.cs
- IndexedString.cs
- EventRecordWrittenEventArgs.cs
- AuthenticationSection.cs
- VScrollProperties.cs
- CommandEventArgs.cs
- TargetParameterCountException.cs
- AnnotationStore.cs
- Point4D.cs
- PrintDialog.cs
- CorrelationResolver.cs
- DbConnectionPoolGroup.cs
- ErrorLog.cs
- X509PeerCertificateAuthenticationElement.cs
- ButtonColumn.cs
- ApplicationBuildProvider.cs