Skip to content

Commit d916f2a

Browse files
Create CreateDBMethod.cs
1 parent 2ace6ff commit d916f2a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using SER.ArgumentSystem.Arguments;
2+
using SER.ArgumentSystem.BaseArguments;
3+
using SER.FileSystem.Structures;
4+
using SER.MethodSystem.BaseMethods;
5+
6+
namespace SER.MethodSystem.Methods.DatabaseMethods;
7+
8+
public class CreateDBMethod : SynchronousMethod
9+
{
10+
public override string Description => "Creates a new JSON file in the database folder.";
11+
12+
public override Argument[] ExpectedArguments =>
13+
[
14+
new TextArgument("name"),
15+
];
16+
17+
public override void Execute()
18+
{
19+
Database.Create(Args.GetText("name"));
20+
}
21+
}

0 commit comments

Comments
 (0)