-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathScriptUsageAttribute.cs
More file actions
38 lines (34 loc) · 1.4 KB
/
ScriptUsageAttribute.cs
File metadata and controls
38 lines (34 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using System;
namespace Microsoft.ClearScript
{
/// <summary>
/// Specifies how the target type member is to be exposed to script code.
/// </summary>
/// <remarks>
/// This attribute is applicable to events, fields, methods, properties, and nested types.
/// </remarks>
[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Struct)]
public class ScriptUsageAttribute : Attribute
{
/// <summary>
/// Initializes a new <c><see cref="ScriptUsageAttribute"/></c> instance.
/// </summary>
public ScriptUsageAttribute()
{
}
/// <summary>
/// Initializes a new <c><see cref="ScriptUsageAttribute"/></c> instance with the specified script access setting.
/// </summary>
/// <param name="access">The script access setting for the target type member.</param>
public ScriptUsageAttribute(ScriptAccess access)
{
Access = access;
}
/// <summary>
/// Gets the script access setting for the target type member.
/// </summary>
public ScriptAccess Access { get; }
}
}