Skip to content

Commit b71b0b9

Browse files
Create DatabaseArgument.cs
1 parent 4d89a01 commit b71b0b9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using JetBrains.Annotations;
2+
using SER.ArgumentSystem.BaseArguments;
3+
using SER.FileSystem.Structures;
4+
using SER.Helpers.ResultSystem;
5+
using SER.TokenSystem.Tokens;
6+
7+
namespace SER.ArgumentSystem.Arguments;
8+
9+
public class DatabaseArgument(string name) : Argument(name)
10+
{
11+
public override string InputDescription => "Database name";
12+
13+
[UsedImplicitly]
14+
public DynamicTryGet<Database> GetConvertSolution(BaseToken token)
15+
{
16+
return new(() => Database.TryGet(token.GetBestTextRepresentation(Script)));
17+
}
18+
}

0 commit comments

Comments
 (0)