Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SessionEndingEventArgs.cs
- _NestedSingleAsyncResult.cs
- ExtractCollection.cs
- XsdValidatingReader.cs
- BehaviorService.cs
- IndividualDeviceConfig.cs
- StylusLogic.cs
- HtmlInputButton.cs
- SimpleHandlerFactory.cs
- ByteAnimationUsingKeyFrames.cs
- PropertyOverridesDialog.cs
- RadioButton.cs
- FrameworkElement.cs
- CssTextWriter.cs
- XPathAncestorQuery.cs
- TextBoxBase.cs
- BaseInfoTable.cs
- ResourceBinder.cs
- FormsAuthenticationTicket.cs
- TypeSystem.cs
- StagingAreaInputItem.cs
- ProviderSettingsCollection.cs
- QilStrConcat.cs
- _PooledStream.cs
- DispatchWrapper.cs
- DbCommandDefinition.cs
- SmiEventSink_DeferedProcessing.cs
- AttachedAnnotationChangedEventArgs.cs
- AttributeCollection.cs
- CookieProtection.cs
- BindingMemberInfo.cs
- EventMap.cs
- InstanceContextManager.cs
- FixedHyperLink.cs
- ProfileSettingsCollection.cs
- SafeIUnknown.cs
- ItemsPanelTemplate.cs
- CalendarAutomationPeer.cs
- PkcsUtils.cs
- ResourcePool.cs
- XmlFormatExtensionPointAttribute.cs
- Base64Decoder.cs
- PolyBezierSegment.cs
- ScriptMethodAttribute.cs
- ParameterDataSourceExpression.cs
- TrustManagerPromptUI.cs
- BooleanConverter.cs
- CallSiteOps.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- XmlQuerySequence.cs
- TemplateControlBuildProvider.cs
- GetFileNameResult.cs
- ContentPlaceHolderDesigner.cs
- GridViewRow.cs
- TreeViewDesigner.cs
- FactoryMaker.cs
- EventSinkHelperWriter.cs
- SchemaImporter.cs
- DependencyObjectType.cs
- EmbeddedObject.cs
- DriveNotFoundException.cs
- Bidi.cs
- EventLog.cs
- MetadataArtifactLoaderComposite.cs
- StatusBarPanelClickEvent.cs
- WindowVisualStateTracker.cs
- ExtensibleClassFactory.cs
- HtmlGenericControl.cs
- SecurityToken.cs
- SweepDirectionValidation.cs
- EnumUnknown.cs
- RadioButton.cs
- URLString.cs
- ISessionStateStore.cs
- QilStrConcatenator.cs
- OrthographicCamera.cs
- ParameterCollectionEditorForm.cs
- TimersDescriptionAttribute.cs
- PenThread.cs
- StandardCommands.cs
- RequestResizeEvent.cs
- FileAccessException.cs
- ColorConvertedBitmap.cs
- ServiceDiscoveryBehavior.cs
- AdornerLayer.cs
- DiagnosticsConfigurationHandler.cs
- SafeViewOfFileHandle.cs
- SymmetricSecurityProtocol.cs
- DataObjectFieldAttribute.cs
- HandlerMappingMemo.cs
- InplaceBitmapMetadataWriter.cs
- TreeNodeBinding.cs
- DispatchRuntime.cs
- ConfigurationPermission.cs
- FormViewDeleteEventArgs.cs
- XmlCDATASection.cs
- Base64Encoding.cs
- PeerReferralPolicy.cs
- ValidationErrorCollection.cs
- DesignTimeTemplateParser.cs