-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleAttributes.cs
More file actions
37 lines (34 loc) · 1.06 KB
/
ModuleAttributes.cs
File metadata and controls
37 lines (34 loc) · 1.06 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
using Modulight.Modules.Hosting;
namespace Modulight.Modules.CommandLine
{
/// <summary>
/// Add all commands from module assembly. <seealso cref="CommandLineModuleExtensions.WithCommandsFromModuleAssembly(ICommandLineModuleManifestBuilder, Type)"/>
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class CommandsFromAssemblyAttribute : Attribute
{
/// <summary>
///
/// </summary>
public CommandsFromAssemblyAttribute() { }
}
/// <summary>
/// Add command from a command type.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public class CommandFromAttribute : Attribute
{
/// <summary>
///
/// </summary>
/// <param name="type"></param>
public CommandFromAttribute(Type type)
{
Type = type;
}
/// <summary>
/// Type of the command.
/// </summary>
public Type Type { get; init; }
}
}