Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- SeekableReadStream.cs
- MenuItem.cs
- Tablet.cs
- ParseNumbers.cs
- BitmapEffect.cs
- FormClosedEvent.cs
- TextServicesCompartmentEventSink.cs
- StringArrayConverter.cs
- SafePEFileHandle.cs
- UserMapPath.cs
- DefaultValueAttribute.cs
- LineBreak.cs
- CompositeTypefaceMetrics.cs
- VectorKeyFrameCollection.cs
- BrowserCapabilitiesFactory.cs
- LogLogRecord.cs
- TypeCollectionPropertyEditor.cs
- SettingsPropertyIsReadOnlyException.cs
- OleDbSchemaGuid.cs
- ByteFacetDescriptionElement.cs
- ElementInit.cs
- StaticContext.cs
- Hash.cs
- SeverityFilter.cs
- VersionedStreamOwner.cs
- JournalEntryStack.cs
- CompareInfo.cs
- WrapPanel.cs
- HttpWebRequestElement.cs
- AuditLevel.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- NumberFormatInfo.cs
- CompressedStack.cs
- WindowsSlider.cs
- SQLDecimal.cs
- DBPropSet.cs
- SafeNativeMethodsMilCoreApi.cs
- DbExpressionRules.cs
- JpegBitmapEncoder.cs
- PanelStyle.cs
- OleDbReferenceCollection.cs
- AnimationClock.cs
- SerializationFieldInfo.cs
- HttpResponseWrapper.cs
- RichTextBoxAutomationPeer.cs
- Point3DCollectionConverter.cs
- MulticastOption.cs
- CheckedPointers.cs
- ReadingWritingEntityEventArgs.cs
- bindurihelper.cs
- CodeVariableReferenceExpression.cs
- CodeDOMUtility.cs
- ReflectionPermission.cs
- SystemIPAddressInformation.cs
- EventProxy.cs
- SiteMapDataSource.cs
- RSAOAEPKeyExchangeFormatter.cs
- CodeDirectiveCollection.cs
- GradientStopCollection.cs
- EventEntry.cs
- ImageEditor.cs
- DecimalFormatter.cs
- DependencyPropertyKind.cs
- Binding.cs
- ExpressionEvaluator.cs
- Icon.cs
- BehaviorEditorPart.cs
- SettingsPropertyCollection.cs
- ToolboxComponentsCreatedEventArgs.cs
- AttachedPropertyInfo.cs
- Attributes.cs
- WmfPlaceableFileHeader.cs
- DataGridViewControlCollection.cs
- Timer.cs
- XmlAttributeOverrides.cs
- RequestCacheManager.cs
- PermissionSetTriple.cs
- WebUtil.cs
- EntityCodeGenerator.cs
- DataServiceKeyAttribute.cs
- ApplicationBuildProvider.cs
- TableColumn.cs
- MetadataCacheItem.cs
- ExpressionPrinter.cs
- AssemblyBuilder.cs
- BaseTemplateParser.cs
- RegistrationServices.cs
- SerialReceived.cs
- VirtualDirectoryMapping.cs
- HashCodeCombiner.cs
- ParserExtension.cs
- SqlClientFactory.cs
- PerformanceCounterPermissionAttribute.cs
- ArrayTypeMismatchException.cs
- CacheRequest.cs
- ServiceBusyException.cs
- ellipse.cs
- HttpTransportElement.cs
- RelationshipType.cs
- SizeAnimationClockResource.cs