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
- Double.cs
- HitTestResult.cs
- UnsafeNetInfoNativeMethods.cs
- TimeoutException.cs
- GridViewDeleteEventArgs.cs
- OleDbException.cs
- GPRECT.cs
- DataTable.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DataBindingCollectionEditor.cs
- LinearKeyFrames.cs
- ReferencedCollectionType.cs
- ErrorHandlerModule.cs
- ValueType.cs
- DoubleAnimation.cs
- Win32.cs
- CellRelation.cs
- IncrementalHitTester.cs
- MethodBuilder.cs
- ParentUndoUnit.cs
- IPAddressCollection.cs
- ObjectSet.cs
- CloudCollection.cs
- ChildrenQuery.cs
- ImpersonateTokenRef.cs
- _HeaderInfo.cs
- CompiledQueryCacheKey.cs
- String.cs
- XmlSchemaRedefine.cs
- WriteableOnDemandPackagePart.cs
- PackageRelationship.cs
- XmlSchemaInferenceException.cs
- CompressionTransform.cs
- PlaceHolder.cs
- FormParameter.cs
- DurableMessageDispatchInspector.cs
- DefaultProxySection.cs
- ServiceReference.cs
- Latin1Encoding.cs
- SafeMILHandle.cs
- FunctionParameter.cs
- AlignmentYValidation.cs
- ProfileInfo.cs
- HostingEnvironmentWrapper.cs
- MobileRedirect.cs
- UserCancellationException.cs
- ManagedWndProcTracker.cs
- ViewCellRelation.cs
- TraceSection.cs
- XslUrlEditor.cs
- StylusPlugInCollection.cs
- Point4DValueSerializer.cs
- odbcmetadatafactory.cs
- FixedSOMPageConstructor.cs
- __Error.cs
- KeyValueConfigurationElement.cs
- SecurityElement.cs
- MarginCollapsingState.cs
- OdbcParameterCollection.cs
- ErrorTableItemStyle.cs
- ImageMap.cs
- PersonalizationEntry.cs
- PeerNameResolver.cs
- ObjectDataProvider.cs
- NextPreviousPagerField.cs
- SpecialNameAttribute.cs
- DetailsViewUpdatedEventArgs.cs
- LayoutDump.cs
- CFGGrammar.cs
- CodeSubDirectoriesCollection.cs
- TextCompositionManager.cs
- StretchValidation.cs
- NumericExpr.cs
- httpserverutility.cs
- ToolStripItemCollection.cs
- WebConfigurationHostFileChange.cs
- AnchorEditor.cs
- JoinCqlBlock.cs
- DeferredReference.cs
- PrivateFontCollection.cs
- GacUtil.cs
- TreeNodeCollection.cs
- DictionaryBase.cs
- IPHostEntry.cs
- NotifyIcon.cs
- DataFieldCollectionEditor.cs
- MatrixTransform.cs
- ComponentEditorPage.cs
- OperationAbortedException.cs
- ButtonBaseAutomationPeer.cs
- FigureParagraph.cs
- FileDialogCustomPlace.cs
- DynamicPropertyReader.cs
- XmlElement.cs
- FamilyMapCollection.cs
- SafeCoTaskMem.cs
- XsdBuilder.cs
- TableRowGroup.cs
- NaturalLanguageHyphenator.cs
- EventSinkActivity.cs