Code:
/ 4.0 / 4.0 / 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. /// ///// // //----------------------------------------------------------------------------- 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
- _AutoWebProxyScriptHelper.cs
- LookupNode.cs
- Console.cs
- BaseInfoTable.cs
- ValidatorCompatibilityHelper.cs
- RijndaelManaged.cs
- AppModelKnownContentFactory.cs
- DataGridColumnFloatingHeader.cs
- TimelineGroup.cs
- Registry.cs
- DataGridToolTip.cs
- CompareInfo.cs
- ExpressionBinding.cs
- GPStream.cs
- TreeViewItemAutomationPeer.cs
- DataTableExtensions.cs
- DesignerProperties.cs
- XmlSchemaDocumentation.cs
- ApplicationActivator.cs
- WindowsAuthenticationEventArgs.cs
- GridViewDeletedEventArgs.cs
- ExtendedPropertyDescriptor.cs
- TripleDESCryptoServiceProvider.cs
- KeyboardNavigation.cs
- DesignColumn.cs
- DataControlImageButton.cs
- Reference.cs
- WebBrowserEvent.cs
- ProfilePropertyNameValidator.cs
- InvalidComObjectException.cs
- TreeNodeConverter.cs
- CodeDOMUtility.cs
- AllMembershipCondition.cs
- CommandBindingCollection.cs
- PolyLineSegment.cs
- TCEAdapterGenerator.cs
- BrowsableAttribute.cs
- IArgumentProvider.cs
- RenderCapability.cs
- WebMessageEncodingElement.cs
- Win32SafeHandles.cs
- PropertyChangingEventArgs.cs
- GroupBoxRenderer.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- MILUtilities.cs
- TextTreeText.cs
- BufferModeSettings.cs
- ActivityMetadata.cs
- DrawingImage.cs
- QueryCacheKey.cs
- PreviewPrintController.cs
- _DisconnectOverlappedAsyncResult.cs
- Deflater.cs
- ConstrainedDataObject.cs
- GraphicsContainer.cs
- ErrorTableItemStyle.cs
- OrderingQueryOperator.cs
- ScrollItemProviderWrapper.cs
- XsltException.cs
- CqlParser.cs
- BinaryObjectReader.cs
- HMACSHA256.cs
- EntityContainer.cs
- SettingsProviderCollection.cs
- WpfPayload.cs
- Tokenizer.cs
- Lasso.cs
- Int32RectValueSerializer.cs
- XmlSerializer.cs
- SplitterCancelEvent.cs
- ConfigXmlComment.cs
- XmlnsCache.cs
- BufferedGraphicsContext.cs
- WindowsTitleBar.cs
- AsymmetricKeyExchangeFormatter.cs
- UInt16Converter.cs
- Style.cs
- ImageKeyConverter.cs
- HtmlFormWrapper.cs
- WizardPanel.cs
- DispatcherExceptionFilterEventArgs.cs
- ExtensionDataObject.cs
- PropertyPushdownHelper.cs
- MemberRelationshipService.cs
- DataListItemEventArgs.cs
- SvcMapFileSerializer.cs
- HttpClientCredentialType.cs
- AutomationFocusChangedEventArgs.cs
- SimpleWorkerRequest.cs
- SizeConverter.cs
- BindingsCollection.cs
- RegionIterator.cs
- ShaperBuffers.cs
- DecimalStorage.cs
- RetrieveVirtualItemEventArgs.cs
- HttpApplicationFactory.cs
- PageSettings.cs
- IndexerReference.cs
- ConstraintStruct.cs
- ConnectivityStatus.cs