-
Notifications
You must be signed in to change notification settings - Fork 2
/
CustomBlockAttribute.cs
32 lines (28 loc) · 1.03 KB
/
CustomBlockAttribute.cs
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
namespace BlocklyNet.Extensions.Builder;
/// <summary>
/// Used to mark a self-describing script block with meta-data.
/// </summary>
/// <param name="key">Unique block key.</param>
/// <param name="category">Toolbox category - leave empty to place on top level.</param>
/// <param name="definition">Block definition.</param>
/// <param name="toolbox">Optional toolbox defaults for the block.</param>
[AttributeUsage(AttributeTargets.Class)]
public class CustomBlockAttribute(string key, string category, string definition, string toolbox) : Attribute
{
/// <summary>
/// Unique block key.
/// </summary>
public readonly string Key = key;
/// <summary>
/// Toolbox category - leave empty to place on top level.
/// </summary>
public readonly string Category = category;
/// <summary>
/// Block definition.
/// </summary>
public readonly string Definition = definition;
/// <summary>
/// Optional toolbox defaults for the block.
/// </summary>
public readonly string Toolbox = toolbox;
}