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
- Bold.cs
- XmlSchemaSimpleTypeUnion.cs
- NativeWindow.cs
- LinqDataSourceEditData.cs
- ContainerAction.cs
- util.cs
- PagedControl.cs
- HtmlInputImage.cs
- DoubleAnimationBase.cs
- SqlServer2KCompatibilityAnnotation.cs
- SingleKeyFrameCollection.cs
- URLString.cs
- HttpProfileBase.cs
- WhereaboutsReader.cs
- AttributeCollection.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- ExpressionEditorSheet.cs
- ServiceDescriptionImporter.cs
- ContentElement.cs
- Parsers.cs
- ListItemCollection.cs
- ProfileEventArgs.cs
- Tokenizer.cs
- ScalarConstant.cs
- HotSpotCollection.cs
- MediaScriptCommandRoutedEventArgs.cs
- SmiEventSink_DeferedProcessing.cs
- ListViewTableRow.cs
- ToggleButton.cs
- SharedConnectionWorkflowTransactionService.cs
- ExcCanonicalXml.cs
- LeafCellTreeNode.cs
- PenLineCapValidation.cs
- PasswordRecovery.cs
- LinearQuaternionKeyFrame.cs
- Accessible.cs
- ParagraphVisual.cs
- GridViewColumn.cs
- XmlCharacterData.cs
- TextElementCollection.cs
- SafeFileHandle.cs
- MobileCategoryAttribute.cs
- Selection.cs
- FormViewPagerRow.cs
- MetadataHelper.cs
- RealizationContext.cs
- UpdateManifestForBrowserApplication.cs
- SharedPersonalizationStateInfo.cs
- AccessedThroughPropertyAttribute.cs
- EditorPartDesigner.cs
- NativeMethods.cs
- ConfigErrorGlyph.cs
- DashStyle.cs
- ActivityTypeDesigner.xaml.cs
- SpoolingTaskBase.cs
- PackageDigitalSignatureManager.cs
- TextTreeText.cs
- WebPartConnectionsEventArgs.cs
- ArithmeticException.cs
- _HTTPDateParse.cs
- HttpHandlerAction.cs
- UrlMappingCollection.cs
- SharedUtils.cs
- MarshalByRefObject.cs
- StyleSelector.cs
- WebPart.cs
- TextServicesCompartmentContext.cs
- Brushes.cs
- ItemCheckEvent.cs
- AsyncDataRequest.cs
- FormsAuthenticationModule.cs
- HttpServerVarsCollection.cs
- HealthMonitoringSectionHelper.cs
- RewritingSimplifier.cs
- DataKeyArray.cs
- GenericEnumConverter.cs
- CompositionAdorner.cs
- CodeExpressionRuleDeclaration.cs
- HyperLinkColumn.cs
- TypeValidationEventArgs.cs
- ErrorHandlingAcceptor.cs
- Cursor.cs
- ExceptionUtil.cs
- TypeDescriptionProvider.cs
- ClockGroup.cs
- SortDescription.cs
- ClientSideProviderDescription.cs
- ListViewContainer.cs
- MonthCalendarDesigner.cs
- Collection.cs
- CommonProperties.cs
- MemoryStream.cs
- HandlerFactoryWrapper.cs
- XXXInfos.cs
- ExpressionBindingCollection.cs
- PermissionToken.cs
- ProcessHostFactoryHelper.cs
- LocalizabilityAttribute.cs
- StorageBasedPackageProperties.cs
- GiveFeedbackEvent.cs