Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Runtime / CompilerServices / DynamicAttribute.cs / 1305376 / DynamicAttribute.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
using System.Collections.Generic;
namespace System.Runtime.CompilerServices
{
///
/// Indicates that the use of on a member is meant to be treated as a dynamically dispatched type.
///
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Class | AttributeTargets.Struct)]
public sealed class DynamicAttribute : Attribute
{
private readonly bool[] _transformFlags;
///
/// Initializes a new instance of the class.
///
///
/// When used in an attribute specification, the default constructor is semantically
/// equivalent to DynamicAttribute({ true }) , and can be considered
/// a shorthand for that expression. It should therefore only be used on an element
/// of type .
///
public DynamicAttribute()
{
this._transformFlags = new bool[] { true };
}
///
/// Initializes a new instance of the class.
///
/// Specifies, in a prefix traversal of a type's
/// construction, which occurrences are meant to
/// be treated as a dynamically dispatched type.
///
/// This constructor is meant to be used on types that are built on an underlying
/// occurrence of that is meant to be treated dynamically.
/// For instance, if C is a generic type with two type parameters, then a
/// use of the constructed typeC< , >
/// might be intended to treat the first type argument dynamically and the second
/// normally, in which case the appropriate attribute specification should
/// use a transformFlags value of { false, true, false } .
///
public DynamicAttribute(bool[] transformFlags)
{
if (transformFlags == null)
{
throw new ArgumentNullException("transformFlags");
}
this._transformFlags = transformFlags;
}
///
/// Specifies, in a prefix traversal of a type's
/// construction, which occurrences are meant to
/// be treated as a dynamically dispatched type.
///
public IList TransformFlags
{
get
{
return Array.AsReadOnly(this._transformFlags);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LineVisual.cs
- LockedActivityGlyph.cs
- HierarchicalDataBoundControl.cs
- TransformCollection.cs
- UxThemeWrapper.cs
- ChtmlTextWriter.cs
- RadialGradientBrush.cs
- FirstMatchCodeGroup.cs
- PropertyGridView.cs
- CssStyleCollection.cs
- CodeSubDirectoriesCollection.cs
- httpapplicationstate.cs
- __TransparentProxy.cs
- InsufficientMemoryException.cs
- DataGridViewAdvancedBorderStyle.cs
- QueryOptionExpression.cs
- SiteMapNodeCollection.cs
- GridViewUpdatedEventArgs.cs
- QuaternionAnimationBase.cs
- DbConnectionStringBuilder.cs
- QualifiedCellIdBoolean.cs
- PreservationFileWriter.cs
- LinqDataSourceInsertEventArgs.cs
- AdornerDecorator.cs
- CompiledELinqQueryState.cs
- XsltArgumentList.cs
- ToolStripArrowRenderEventArgs.cs
- BamlWriter.cs
- DbConnectionClosed.cs
- WinFormsComponentEditor.cs
- Parallel.cs
- AuthenticationManager.cs
- ClientEndpointLoader.cs
- BitmapImage.cs
- RepeaterCommandEventArgs.cs
- MonthCalendar.cs
- RSAPKCS1SignatureFormatter.cs
- ProcessingInstructionAction.cs
- ConnectionProviderAttribute.cs
- FloaterBaseParaClient.cs
- XmlDataCollection.cs
- VersionedStreamOwner.cs
- SecurityKeyIdentifier.cs
- BasicExpandProvider.cs
- TreeNode.cs
- Choices.cs
- CompilationUtil.cs
- UnSafeCharBuffer.cs
- SHA256Cng.cs
- NamedPipeConnectionPool.cs
- COM2PictureConverter.cs
- UnmanagedMemoryStreamWrapper.cs
- ShimAsPublicXamlType.cs
- WsdlExporter.cs
- ScriptBehaviorDescriptor.cs
- TimelineGroup.cs
- QuadraticBezierSegment.cs
- DataFormat.cs
- MsmqIntegrationValidationBehavior.cs
- XXXInfos.cs
- NumberFunctions.cs
- DataGridViewLayoutData.cs
- ErrorEventArgs.cs
- PreDigestedSignedInfo.cs
- PointCollection.cs
- MessageParameterAttribute.cs
- UserPreferenceChangingEventArgs.cs
- HTMLTextWriter.cs
- WorkflowMarkupSerializationProvider.cs
- SiteMapNodeCollection.cs
- Rfc2898DeriveBytes.cs
- AggregationMinMaxHelpers.cs
- ImportCatalogPart.cs
- WebConfigurationManager.cs
- ToolstripProfessionalRenderer.cs
- WebPartDisplayModeEventArgs.cs
- Behavior.cs
- BaseProcessor.cs
- Config.cs
- SequenceFullException.cs
- SubMenuStyle.cs
- BaseEntityWrapper.cs
- HierarchicalDataSourceConverter.cs
- DescriptionAttribute.cs
- SecurityElement.cs
- NativeCompoundFileAPIs.cs
- MembershipUser.cs
- HighlightVisual.cs
- HatchBrush.cs
- Style.cs
- ThrowHelper.cs
- FormatVersion.cs
- SqlTriggerAttribute.cs
- RemotingSurrogateSelector.cs
- Registry.cs
- SelectionPattern.cs
- BackgroundFormatInfo.cs
- OrderedDictionary.cs
- StylusDevice.cs
- SchemaElementDecl.cs