Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } } }/// The arguments for the attribute. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GridViewHeaderRowPresenter.cs
- XsdBuildProvider.cs
- CounterSample.cs
- IIS7UserPrincipal.cs
- RowToParametersTransformer.cs
- GeneratedCodeAttribute.cs
- ResizeBehavior.cs
- ParameterToken.cs
- ConditionValidator.cs
- _ProxyChain.cs
- ByteRangeDownloader.cs
- ErrorStyle.cs
- TextBox.cs
- MenuCommandService.cs
- PopOutPanel.cs
- OrderedEnumerableRowCollection.cs
- BaseCodePageEncoding.cs
- TagMapCollection.cs
- MappingMetadataHelper.cs
- VariableElement.cs
- GPRECT.cs
- ParameterCollection.cs
- WpfXamlLoader.cs
- ContentType.cs
- GlobalEventManager.cs
- OAVariantLib.cs
- ApplicationManager.cs
- ReadOnlyTernaryTree.cs
- TransformerInfoCollection.cs
- RemoteX509Token.cs
- EntityDataSourceUtil.cs
- BinaryCommonClasses.cs
- RowTypeElement.cs
- TemplatedMailWebEventProvider.cs
- TextDecorationCollection.cs
- MyContact.cs
- MissingSatelliteAssemblyException.cs
- ParentQuery.cs
- ClaimComparer.cs
- WpfPayload.cs
- LoginView.cs
- Point3D.cs
- XamlTypeMapperSchemaContext.cs
- CookieProtection.cs
- StrokeNodeOperations2.cs
- SafeNativeHandle.cs
- LockCookie.cs
- Grid.cs
- Resources.Designer.cs
- IisTraceListener.cs
- KeyedQueue.cs
- FlowLayoutSettings.cs
- TablePatternIdentifiers.cs
- Debug.cs
- PropertyInfo.cs
- ThemeableAttribute.cs
- ViewManager.cs
- TextBox.cs
- TabItemWrapperAutomationPeer.cs
- PrintController.cs
- EventData.cs
- WmlObjectListAdapter.cs
- BufferModesCollection.cs
- SmuggledIUnknown.cs
- WhiteSpaceTrimStringConverter.cs
- TabControlEvent.cs
- ObjectQuery_EntitySqlExtensions.cs
- MSAANativeProvider.cs
- RIPEMD160Managed.cs
- MediaTimeline.cs
- EnumConverter.cs
- CommandLineParser.cs
- UserControlBuildProvider.cs
- EntityContainerEntitySet.cs
- DependencyObjectProvider.cs
- StateMachineDesignerPaint.cs
- SqlDuplicator.cs
- SynchronizingStream.cs
- ConfigXmlComment.cs
- WriteTimeStream.cs
- ObfuscateAssemblyAttribute.cs
- GradientBrush.cs
- RelationshipNavigation.cs
- NativeMethodsOther.cs
- KernelTypeValidation.cs
- RuntimeTransactionHandle.cs
- FileLogRecord.cs
- PrintPageEvent.cs
- HMACSHA512.cs
- TaskFormBase.cs
- InternalsVisibleToAttribute.cs
- FixedTextView.cs
- HttpCachePolicy.cs
- ArgumentException.cs
- CategoryAttribute.cs
- SQLInt16Storage.cs
- BamlLocalizabilityResolver.cs
- Panel.cs
- FormsAuthenticationCredentials.cs
- __TransparentProxy.cs