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
- MatrixTransform3D.cs
- DataPointer.cs
- EventSourceCreationData.cs
- Viewport3DAutomationPeer.cs
- TypeGeneratedEventArgs.cs
- XmlSerializerSection.cs
- FileClassifier.cs
- UnsafeNativeMethods.cs
- PersonalizationState.cs
- WindowCollection.cs
- EventMappingSettingsCollection.cs
- StatusStrip.cs
- WebControl.cs
- _ServiceNameStore.cs
- RefreshPropertiesAttribute.cs
- MemberDescriptor.cs
- HitTestFilterBehavior.cs
- BaseUriHelper.cs
- AnnotationHelper.cs
- SendingRequestEventArgs.cs
- userdatakeys.cs
- SHA512Managed.cs
- CapabilitiesSection.cs
- ExceptionHandlersDesigner.cs
- FormViewDeleteEventArgs.cs
- WebHttpEndpoint.cs
- DocumentViewerAutomationPeer.cs
- IndentedWriter.cs
- FacetDescriptionElement.cs
- ThreadStateException.cs
- StaticFileHandler.cs
- Deflater.cs
- FileUtil.cs
- SchemaImporterExtensionElementCollection.cs
- FormsAuthenticationModule.cs
- XmlILTrace.cs
- ExceptionHelpers.cs
- ImpersonateTokenRef.cs
- WindowsRebar.cs
- cookieexception.cs
- Brush.cs
- FreezableDefaultValueFactory.cs
- ExpressionConverter.cs
- OrderedDictionary.cs
- AttributeUsageAttribute.cs
- AnimationException.cs
- InstanceValue.cs
- XmlQueryStaticData.cs
- SubMenuStyle.cs
- CorrelationExtension.cs
- StyleXamlParser.cs
- DataRecordInfo.cs
- WebPartConnectionsDisconnectVerb.cs
- SelectionHighlightInfo.cs
- TemplateControlBuildProvider.cs
- XmlUrlEditor.cs
- Parallel.cs
- LineMetrics.cs
- Util.cs
- OpenTypeLayout.cs
- BindableAttribute.cs
- TraceXPathNavigator.cs
- GridViewColumnHeaderAutomationPeer.cs
- ParenthesizePropertyNameAttribute.cs
- RuleSetDialog.cs
- DiscreteKeyFrames.cs
- MulticastOption.cs
- StandardBindingImporter.cs
- ModifierKeysConverter.cs
- CheckBoxPopupAdapter.cs
- ForwardPositionQuery.cs
- Binding.cs
- StylusPointProperty.cs
- CheckBoxStandardAdapter.cs
- URLIdentityPermission.cs
- SqlConnection.cs
- ExpressionBuilderCollection.cs
- util.cs
- Stack.cs
- JournalEntryStack.cs
- XPathQilFactory.cs
- ValidationManager.cs
- XamlFigureLengthSerializer.cs
- CommonDialog.cs
- DrawingDrawingContext.cs
- PointCollection.cs
- Control.cs
- CharStorage.cs
- StyleCollection.cs
- MsdtcClusterUtils.cs
- CfgRule.cs
- XmlSchemaComplexContentExtension.cs
- TimelineGroup.cs
- ChineseLunisolarCalendar.cs
- KeyboardEventArgs.cs
- OrderedDictionary.cs
- BreakRecordTable.cs
- SchemeSettingElementCollection.cs
- DataGridViewColumnHeaderCell.cs
- WSSecurityPolicy11.cs