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
- BufferBuilder.cs
- CallSiteBinder.cs
- SafeNativeMethods.cs
- MouseGestureConverter.cs
- AlternateViewCollection.cs
- SqlException.cs
- tabpagecollectioneditor.cs
- BitmapScalingModeValidation.cs
- ArraySubsetEnumerator.cs
- Dump.cs
- SqlReferenceCollection.cs
- InputEventArgs.cs
- ViewCellSlot.cs
- MetabaseServerConfig.cs
- SiteMapDesignerDataSourceView.cs
- ValueUtilsSmi.cs
- ListChangedEventArgs.cs
- XmlSchemaImporter.cs
- XhtmlBasicSelectionListAdapter.cs
- WindowPattern.cs
- XamlSerializerUtil.cs
- LineServicesRun.cs
- TreeNodeStyle.cs
- DesignColumnCollection.cs
- ListBoxItemWrapperAutomationPeer.cs
- QuaternionIndependentAnimationStorage.cs
- HtmlInputCheckBox.cs
- SignedXml.cs
- SecurityBindingElementImporter.cs
- WebPartTransformerCollection.cs
- TextPenaltyModule.cs
- SizeConverter.cs
- NavigationPropertySingletonExpression.cs
- ToolTipService.cs
- _ConnectionGroup.cs
- TextEndOfSegment.cs
- RtType.cs
- DropAnimation.xaml.cs
- BamlReader.cs
- XmlSchema.cs
- CurrencyWrapper.cs
- CommandConverter.cs
- UnauthorizedAccessException.cs
- ConfigurationSectionGroupCollection.cs
- sqlstateclientmanager.cs
- TargetInvocationException.cs
- TreeViewBindingsEditor.cs
- StorageConditionPropertyMapping.cs
- GeneralTransform3DGroup.cs
- InputLangChangeRequestEvent.cs
- MessageSecurityOverHttp.cs
- InvokeCompletedEventArgs.cs
- PresentationTraceSources.cs
- PagesChangedEventArgs.cs
- TypeLibConverter.cs
- UiaCoreProviderApi.cs
- TickBar.cs
- OrthographicCamera.cs
- QilSortKey.cs
- RemotingSurrogateSelector.cs
- OraclePermission.cs
- PageCatalogPartDesigner.cs
- StoreAnnotationsMap.cs
- SecurityDescriptor.cs
- SafeBitVector32.cs
- HttpTransportElement.cs
- DataGridSortingEventArgs.cs
- EventLogPropertySelector.cs
- ContextBase.cs
- ProjectedSlot.cs
- PropertyChangeTracker.cs
- StatusBarItemAutomationPeer.cs
- VisualTreeHelper.cs
- ControlType.cs
- ExtendedProperty.cs
- ErrorProvider.cs
- DataGridViewRowHeaderCell.cs
- SortQueryOperator.cs
- LongCountAggregationOperator.cs
- ProcessModule.cs
- DefaultMemberAttribute.cs
- ToolStripRendererSwitcher.cs
- Propagator.JoinPropagator.cs
- DataColumnChangeEvent.cs
- XmlSerializer.cs
- EndEvent.cs
- MonthCalendarDesigner.cs
- ScrollChrome.cs
- XmlMapping.cs
- XmlSchemaInferenceException.cs
- ADMembershipProvider.cs
- FontFamily.cs
- AggregateException.cs
- ProcessHostMapPath.cs
- StringCollection.cs
- XmlConvert.cs
- MetadataCache.cs
- MimeMultiPart.cs
- CustomExpressionEventArgs.cs
- XmlSchemaAppInfo.cs