Server => Interface

This commit is contained in:
Cyberboss
2017-10-20 14:12:46 -04:00
parent 81adbb454a
commit 2fba289804
21 changed files with 456 additions and 456 deletions
+5 -5
View File
@@ -28,7 +28,7 @@ namespace TGCommandLine
protected override ExitCode Run(IList<string> parameters)
{
var res = Server.GetComponent<ITGConfig>().DeleteFile(parameters[0], out bool unauthorized);
var res = Interface.GetComponent<ITGConfig>().DeleteFile(parameters[0], out bool unauthorized);
if (res != null)
{
OutputProc(res);
@@ -64,7 +64,7 @@ namespace TGCommandLine
}
protected override ExitCode Run(IList<string> parameters)
{
var list = Server.GetComponent<ITGConfig>().ListStaticDirectory(parameters.Count > 0 ? parameters[0] : null, out string error, out bool unauthorized);
var list = Interface.GetComponent<ITGConfig>().ListStaticDirectory(parameters.Count > 0 ? parameters[0] : null, out string error, out bool unauthorized);
if(list == null)
{
OutputProc(error);
@@ -88,7 +88,7 @@ namespace TGCommandLine
protected override ExitCode Run(IList<string> parameters)
{
OutputProc(Server.GetComponent<ITGConfig>().ServerDirectory());
OutputProc(Interface.GetComponent<ITGConfig>().ServerDirectory());
return ExitCode.Normal;
}
@@ -108,7 +108,7 @@ namespace TGCommandLine
protected override ExitCode Run(IList<string> parameters)
{
var bytes = Server.GetComponent<ITGConfig>().ReadText(parameters[0], parameters.Count > 2 && parameters[2].ToLower() == "--repo", out string error, out bool unauthorized);
var bytes = Interface.GetComponent<ITGConfig>().ReadText(parameters[0], parameters.Count > 2 && parameters[2].ToLower() == "--repo", out string error, out bool unauthorized);
if(bytes == null)
{
OutputProc("Error: " + error);
@@ -148,7 +148,7 @@ namespace TGCommandLine
{
try
{
var res = Server.GetComponent<ITGConfig>().WriteText(parameters[0], File.ReadAllText(parameters[1]), out bool unauthorized);
var res = Interface.GetComponent<ITGConfig>().WriteText(parameters[0], File.ReadAllText(parameters[1]), out bool unauthorized);
if (res != null)
{
OutputProc("Error: " + res);