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
- BitmapEffectInputConnector.cs
- MemberCollection.cs
- AudioFileOut.cs
- PropertySet.cs
- updatecommandorderer.cs
- ListDictionary.cs
- HwndProxyElementProvider.cs
- Pair.cs
- KeyConverter.cs
- TypeSystemProvider.cs
- _HelperAsyncResults.cs
- CodeTypeMemberCollection.cs
- XmlSerializer.cs
- DialogResultConverter.cs
- PostBackOptions.cs
- SharedStream.cs
- LinkedList.cs
- FrameworkTextComposition.cs
- ProtocolsConfigurationEntry.cs
- AnnotationObservableCollection.cs
- CopyAction.cs
- HttpModuleCollection.cs
- FindResponse.cs
- Stacktrace.cs
- UdpTransportSettingsElement.cs
- UserControl.cs
- CodePropertyReferenceExpression.cs
- ItemType.cs
- SqlInternalConnection.cs
- ClientType.cs
- DataPagerCommandEventArgs.cs
- DurableInstanceManager.cs
- ContractNamespaceAttribute.cs
- Message.cs
- SatelliteContractVersionAttribute.cs
- EntityCommandDefinition.cs
- DefaultTextStoreTextComposition.cs
- OdbcFactory.cs
- HttpHandlerActionCollection.cs
- Maps.cs
- XPathException.cs
- StructuredTypeEmitter.cs
- XPathException.cs
- PrinterSettings.cs
- PrintPreviewControl.cs
- StylusPointProperty.cs
- ResourceExpression.cs
- HttpModuleCollection.cs
- InteropExecutor.cs
- EventHandlersStore.cs
- FreeFormDesigner.cs
- StreamUpdate.cs
- Rotation3DKeyFrameCollection.cs
- ThreadAbortException.cs
- SafeSystemMetrics.cs
- AsyncOperation.cs
- SaveFileDialogDesigner.cs
- DSASignatureFormatter.cs
- StoreContentChangedEventArgs.cs
- MemberHolder.cs
- StaticExtension.cs
- PointCollection.cs
- PointAnimationClockResource.cs
- SocketElement.cs
- HttpListenerRequest.cs
- DynamicEndpoint.cs
- SHA512Managed.cs
- WebEventCodes.cs
- BrowserDefinition.cs
- HashAlgorithm.cs
- ScaleTransform.cs
- BamlBinaryWriter.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ToolStripRenderer.cs
- SapiRecoContext.cs
- ToolStripItemCollection.cs
- ValidationHelper.cs
- EntityDataSourceSelectingEventArgs.cs
- SpeechAudioFormatInfo.cs
- UrlAuthorizationModule.cs
- SqlDependency.cs
- HtmlInputControl.cs
- GridViewDeletedEventArgs.cs
- ContextMenu.cs
- FormViewPageEventArgs.cs
- GridViewColumnHeader.cs
- MultiTrigger.cs
- XmlDomTextWriter.cs
- SessionStateContainer.cs
- RotateTransform3D.cs
- Application.cs
- OleDbConnection.cs
- XPathNavigatorReader.cs
- Subtract.cs
- WriteTimeStream.cs
- ToolStripArrowRenderEventArgs.cs
- MsdtcClusterUtils.cs
- OracleParameterCollection.cs
- BaseCodeDomTreeGenerator.cs
- MetadataCollection.cs