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
- TypedRowGenerator.cs
- HGlobalSafeHandle.cs
- ResourceBinder.cs
- MetadataItem_Static.cs
- TrackingAnnotationCollection.cs
- DbConnectionPoolGroupProviderInfo.cs
- CancellationTokenRegistration.cs
- InternalBufferOverflowException.cs
- ServiceOperationParameter.cs
- WebDescriptionAttribute.cs
- DataGridSortCommandEventArgs.cs
- DisableDpiAwarenessAttribute.cs
- CodeAttachEventStatement.cs
- XmlSigningNodeWriter.cs
- DocComment.cs
- ScopelessEnumAttribute.cs
- __Filters.cs
- NamedElement.cs
- MsmqException.cs
- ExpressionNormalizer.cs
- ImageCodecInfo.cs
- HybridDictionary.cs
- Walker.cs
- InfoCardService.cs
- WindowsRebar.cs
- DbConnectionPoolIdentity.cs
- Polygon.cs
- MessagingActivityHelper.cs
- AmbientValueAttribute.cs
- EtwTrace.cs
- RadioButtonList.cs
- ListChangedEventArgs.cs
- UserControl.cs
- Relationship.cs
- linebase.cs
- IssuanceTokenProviderBase.cs
- Delay.cs
- WebPartsSection.cs
- ShutDownListener.cs
- TargetInvocationException.cs
- CmsUtils.cs
- DataRelationCollection.cs
- ScrollItemPattern.cs
- NamespaceMapping.cs
- TextTrailingWordEllipsis.cs
- X509Certificate.cs
- TraceListeners.cs
- TemplateKey.cs
- TableStyle.cs
- StylusLogic.cs
- SessionStateUtil.cs
- EntitySqlException.cs
- DataGridCell.cs
- TableLayoutPanel.cs
- InitializationEventAttribute.cs
- SelectedDatesCollection.cs
- SiteMapProvider.cs
- FragmentQueryKB.cs
- Int32RectValueSerializer.cs
- XmlLangPropertyAttribute.cs
- ExtenderProvidedPropertyAttribute.cs
- EditModeSwitchButton.cs
- RuntimeIdentifierPropertyAttribute.cs
- ZoneLinkButton.cs
- GlobalItem.cs
- SymbolMethod.cs
- HtmlContainerControl.cs
- PropertyGridView.cs
- ManagedWndProcTracker.cs
- BinaryNode.cs
- DoubleCollectionConverter.cs
- Pens.cs
- DocumentPageViewAutomationPeer.cs
- TextTrailingWordEllipsis.cs
- Flattener.cs
- FileDialogCustomPlacesCollection.cs
- Speller.cs
- Point3D.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- SelectManyQueryOperator.cs
- InfoCardXmlSerializer.cs
- GradientStop.cs
- AdornerDecorator.cs
- SoapExtension.cs
- CompilerResults.cs
- basecomparevalidator.cs
- WhitespaceSignificantCollectionAttribute.cs
- SplitterEvent.cs
- JulianCalendar.cs
- ErrorInfoXmlDocument.cs
- ConfigurationConverterBase.cs
- SqlWebEventProvider.cs
- ToolBarButton.cs
- DataGridViewDataConnection.cs
- WebReferencesBuildProvider.cs
- ParallelTimeline.cs
- ValidationRule.cs
- Misc.cs
- StrongBox.cs
- TableProviderWrapper.cs