// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using System; namespace Microsoft.ClearScript { ///

/// Specifies how the target type member is to be exposed to script code. /// /// /// This attribute is applicable to events, fields, methods, properties, and nested types. /// [AttributeUsage(AttributeTargets.Event | AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct)] public class ScriptUsageAttribute : Attribute { private readonly ScriptAccess access; /// /// Initializes a new instance. /// public ScriptUsageAttribute() { } /// /// Initializes a new instance with the specified script access setting. /// /// The script access setting for the target type member. public ScriptUsageAttribute(ScriptAccess access) { this.access = access; } /// /// Gets the script access setting for the target type member. /// public ScriptAccess Access { get { return access; } } } }