Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- TrimSurroundingWhitespaceAttribute.cs
- GlobalEventManager.cs
- PropertyPathWorker.cs
- SqlClientWrapperSmiStreamChars.cs
- BinaryNode.cs
- DataGridViewLinkColumn.cs
- FileFormatException.cs
- TextTreePropertyUndoUnit.cs
- OleDbTransaction.cs
- SchemaNamespaceManager.cs
- DictionaryBase.cs
- NativeStructs.cs
- AutoGeneratedField.cs
- PointCollection.cs
- GeneralTransform3DTo2DTo3D.cs
- EventData.cs
- DbProviderSpecificTypePropertyAttribute.cs
- MasterPageBuildProvider.cs
- XmlElementList.cs
- WebReference.cs
- SqlInfoMessageEvent.cs
- ConfigXmlElement.cs
- HtmlInputControl.cs
- ComponentEditorForm.cs
- CacheDict.cs
- SizeLimitedCache.cs
- DecoderBestFitFallback.cs
- FormatException.cs
- ThreadExceptionEvent.cs
- ConfigurationStrings.cs
- DataTemplateKey.cs
- MaskedTextBoxTextEditor.cs
- BinaryParser.cs
- Point3DKeyFrameCollection.cs
- PipeStream.cs
- AppDomainResourcePerfCounters.cs
- Setter.cs
- XPathAncestorIterator.cs
- FileRecordSequenceCompletedAsyncResult.cs
- WebConfigurationHost.cs
- BackStopAuthenticationModule.cs
- LayoutInformation.cs
- URLIdentityPermission.cs
- CalendarDay.cs
- TemplatedEditableDesignerRegion.cs
- TrustVersion.cs
- ProcessManager.cs
- WebColorConverter.cs
- _ListenerAsyncResult.cs
- DateTimeFormatInfo.cs
- XmlImplementation.cs
- DataKeyCollection.cs
- JsonReaderDelegator.cs
- Menu.cs
- ConnectionStringsExpressionEditor.cs
- TextChange.cs
- SelectionEditor.cs
- RegexCompilationInfo.cs
- DefaultPrintController.cs
- IdentityVerifier.cs
- PauseStoryboard.cs
- UnsafeNativeMethods.cs
- ValidationRuleCollection.cs
- SchemaImporterExtensionElement.cs
- AnnotationObservableCollection.cs
- SingleStorage.cs
- StrokeCollectionConverter.cs
- DataGridViewRowPostPaintEventArgs.cs
- ObjectItemCollection.cs
- QilList.cs
- ToolStripScrollButton.cs
- _AuthenticationState.cs
- XmlNamespaceMappingCollection.cs
- SqlWebEventProvider.cs
- TextTreeExtractElementUndoUnit.cs
- EventHandlersStore.cs
- UnsafeMethods.cs
- UserPersonalizationStateInfo.cs
- RegisteredHiddenField.cs
- ConnectionManager.cs
- sqlnorm.cs
- IntegrationExceptionEventArgs.cs
- MulticastIPAddressInformationCollection.cs
- CmsInterop.cs
- BamlBinaryReader.cs
- OracleColumn.cs
- IntegerCollectionEditor.cs
- ServiceEndpointElement.cs
- ColumnResizeUndoUnit.cs
- ProxyGenerationError.cs
- DateTimeConstantAttribute.cs
- LifetimeServices.cs
- ConstructorNeedsTagAttribute.cs
- XamlTypeMapper.cs
- ObjectHandle.cs
- DesignerActionGlyph.cs
- InfoCardMasterKey.cs
- FieldNameLookup.cs
- KeyValuePairs.cs
- regiisutil.cs