aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Engine
diff options
context:
space:
mode:
authorAlex-TIMEHACK <[email protected]>2017-10-15 20:25:37 +0100
committerAlex-TIMEHACK <[email protected]>2017-10-15 20:25:37 +0100
commitb2f7322f3072ff90c8e6039ec4b3219d3c3fb919 (patch)
treec9bfc21c4cc20df9eab5dbaa1c12772a90ef0f74 /ShiftOS.Engine
parent7efdde5832b517153363621aaec982211ff25f61 (diff)
downloadshiftos-rewind-b2f7322f3072ff90c8e6039ec4b3219d3c3fb919.tar.gz
shiftos-rewind-b2f7322f3072ff90c8e6039ec4b3219d3c3fb919.tar.bz2
shiftos-rewind-b2f7322f3072ff90c8e6039ec4b3219d3c3fb919.zip
It's broken.
Diffstat (limited to 'ShiftOS.Engine')
-rw-r--r--ShiftOS.Engine/ShiftOS.Engine.csproj3
-rw-r--r--ShiftOS.Engine/Terminal/Commands/Hello.cs21
-rw-r--r--ShiftOS.Engine/Terminal/TerminalBackend.cs46
-rw-r--r--ShiftOS.Engine/Terminal/TerminalCommand.cs19
4 files changed, 0 insertions, 89 deletions
diff --git a/ShiftOS.Engine/ShiftOS.Engine.csproj b/ShiftOS.Engine/ShiftOS.Engine.csproj
index 6740db1..8d3d003 100644
--- a/ShiftOS.Engine/ShiftOS.Engine.csproj
+++ b/ShiftOS.Engine/ShiftOS.Engine.csproj
@@ -52,9 +52,6 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
- <Compile Include="Terminal\Commands\Hello.cs" />
- <Compile Include="Terminal\TerminalBackend.cs" />
- <Compile Include="Terminal\TerminalCommand.cs" />
<Compile Include="Tools.cs" />
<Compile Include="WindowManager\InfoboxTemplate.cs">
<SubType>UserControl</SubType>
diff --git a/ShiftOS.Engine/Terminal/Commands/Hello.cs b/ShiftOS.Engine/Terminal/Commands/Hello.cs
deleted file mode 100644
index 531bd1f..0000000
--- a/ShiftOS.Engine/Terminal/Commands/Hello.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ShiftOS.Engine.Terminal.Commands
-{
- public class Hello : TerminalCommand
- {
- public override string GetName()
- {
- return "Hello";
- }
-
- public override string Run(params string[] parameters)
- {
- return "Oh, HELLO, " + String.Join(" ", parameters);
- }
- }
-}
diff --git a/ShiftOS.Engine/Terminal/TerminalBackend.cs b/ShiftOS.Engine/Terminal/TerminalBackend.cs
deleted file mode 100644
index 7103238..0000000
--- a/ShiftOS.Engine/Terminal/TerminalBackend.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ShiftOS.Engine.Terminal
-{
- public static class TerminalBackend
- {
- // The line below gets all the terminal commands in... well... the entire ShiftOS.Engine
- public static IEnumerable<TerminalCommand> instances = from t in Assembly.GetExecutingAssembly().GetTypes()
- where t.IsSubclassOf(typeof(TerminalCommand))
- && t.GetConstructor(Type.EmptyTypes) != null
- select Activator.CreateInstance(t) as TerminalCommand;
-
- /// <summary>
- /// Runs a terminal command.
- /// </summary>
- /// <param name="command"></param>
- /// <returns>Returns all the output from that command.</returns>
- public static string RunCommand(string command)
- {
- string name;
- try { name = command.Split(' ')[0]; } catch { name = command; }
-
- var theParams = new string[command.Split(' ').Length - 1];
- Array.Copy(command.Split(' '), 1, theParams, 0, command.Split(' ').Length - 1);
-
- foreach (TerminalCommand instance in instances)
- {
- if (instance.GetName() == name)
- return instance.Run(theParams);
- }
-
- return "The command cannot be found.";
- }
-
- // An extra function ;)
- private static Type[] GetTypesInNamespace(Assembly assembly, string nameSpace)
- {
- return assembly.GetTypes().Where(t => String.Equals(t.Namespace, nameSpace, StringComparison.Ordinal)).ToArray();
- }
- }
-}
diff --git a/ShiftOS.Engine/Terminal/TerminalCommand.cs b/ShiftOS.Engine/Terminal/TerminalCommand.cs
deleted file mode 100644
index b5dd8bf..0000000
--- a/ShiftOS.Engine/Terminal/TerminalCommand.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace ShiftOS.Engine.Terminal
-{
- public class TerminalCommand
- {
- public string GetName() { return ""; }
-
- public void Run(params string[] parameters) { return ""; }
-
- public void Run(params string[] parameters) {
-
- }
- }
-}