Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } } }/// The arguments for the attribute. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SpeechSeg.cs
- PageAsyncTask.cs
- WebSysDescriptionAttribute.cs
- DataObjectPastingEventArgs.cs
- safex509handles.cs
- PerformanceCounterCategory.cs
- DataGridSortCommandEventArgs.cs
- TextStore.cs
- SerialReceived.cs
- Literal.cs
- XhtmlCssHandler.cs
- SortableBindingList.cs
- Int64Animation.cs
- HtmlInputText.cs
- RelatedView.cs
- RegistrySecurity.cs
- DocumentEventArgs.cs
- OdbcTransaction.cs
- BmpBitmapEncoder.cs
- GACIdentityPermission.cs
- Rotation3DKeyFrameCollection.cs
- EntityDataSourceColumn.cs
- JsonGlobals.cs
- InternalConfigEventArgs.cs
- UpdateTranslator.cs
- LinqToSqlWrapper.cs
- XomlCompilerResults.cs
- AuthenticationModuleElementCollection.cs
- WindowsListBox.cs
- QueryableDataSourceEditData.cs
- DeviceContext.cs
- storepermissionattribute.cs
- HttpValueCollection.cs
- TextCompositionEventArgs.cs
- CapiNative.cs
- RtType.cs
- DoubleIndependentAnimationStorage.cs
- StylusPoint.cs
- LocatorPartList.cs
- BaseValidator.cs
- HashHelper.cs
- DeclarativeCatalogPart.cs
- PropertyConverter.cs
- HashAlgorithm.cs
- CorePropertiesFilter.cs
- ObjectStorage.cs
- OdbcParameter.cs
- EventSourceCreationData.cs
- Translator.cs
- HTMLTextWriter.cs
- ScriptControlManager.cs
- SynchronizedInputAdaptor.cs
- TypeBuilder.cs
- recordstatefactory.cs
- ComplexTypeEmitter.cs
- DeadCharTextComposition.cs
- ListSourceHelper.cs
- TreeNodeBindingCollection.cs
- XmlWriterTraceListener.cs
- WebControlToolBoxItem.cs
- CipherData.cs
- LookupBindingPropertiesAttribute.cs
- UIAgentMonitorHandle.cs
- RectAnimationBase.cs
- AnnotationMap.cs
- StaticResourceExtension.cs
- GestureRecognitionResult.cs
- XamlRtfConverter.cs
- Vector3D.cs
- ResourceAttributes.cs
- XamlRtfConverter.cs
- HtmlFormAdapter.cs
- DatagridviewDisplayedBandsData.cs
- NativeMethods.cs
- NonParentingControl.cs
- ParserHooks.cs
- ParseChildrenAsPropertiesAttribute.cs
- StringResourceManager.cs
- VisualBasicSettingsHandler.cs
- __TransparentProxy.cs
- IsolatedStorage.cs
- ToolStripContainer.cs
- MsmqInputChannelBase.cs
- SettingsPropertyNotFoundException.cs
- ExtensibleSyndicationObject.cs
- BrowserTree.cs
- BroadcastEventHelper.cs
- SafeRightsManagementHandle.cs
- CodeTypeReference.cs
- RegexCharClass.cs
- ColumnTypeConverter.cs
- _AuthenticationState.cs
- StrongNameIdentityPermission.cs
- PropertyDescriptorGridEntry.cs
- StaticExtension.cs
- XmlSchemaInclude.cs
- FormsAuthenticationEventArgs.cs
- XmlSchemaChoice.cs
- TabItemWrapperAutomationPeer.cs
- TraceHandlerErrorFormatter.cs