mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-23 06:18:54 +00:00
66 lines
1.8 KiB
C#
66 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using Sys = Cosmos.System;
|
|
using Cosmos.Common.Extensions;
|
|
using System.IO;
|
|
using Cosmos.Debug.Kernel;
|
|
|
|
namespace MatthijsPlayground
|
|
{
|
|
public class Kernel : Sys.Kernel
|
|
{
|
|
private class TestComparer : IEqualityComparer<int>
|
|
{
|
|
public bool Equals(int x, int y)
|
|
{
|
|
return x == y;
|
|
}
|
|
|
|
public int GetHashCode(int obj)
|
|
{
|
|
return obj.GetHashCode();
|
|
}
|
|
}
|
|
protected override void BeforeRun()
|
|
{
|
|
Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");
|
|
}
|
|
|
|
private static byte[] mTestBytes;
|
|
|
|
protected override void Run()
|
|
{
|
|
var xDict = new Dictionary<int, string>(new TestComparer());
|
|
xDict.Add(1, "One");
|
|
xDict.Add(2, "Two");
|
|
DoSomething();
|
|
Stop();
|
|
}
|
|
|
|
private static void DoSomething()
|
|
{
|
|
Console.WriteLine("Before Everything");
|
|
|
|
//var xString = "";
|
|
//var xDbg = new Debugger("kernel", "kernel");
|
|
//xDbg.Send(xString);
|
|
//var xSB = new StringBuilder();
|
|
//xSB.Append("Hello");
|
|
//xSB.Append("Hello");
|
|
//var xDisplay = xSB.ToString();
|
|
//Console.WriteLine(xDisplay.Length);
|
|
//Console.WriteLine(xDisplay);
|
|
|
|
Console.WriteLine("After everything");
|
|
//WriteLine("Line2");
|
|
//WriteLine("Line3");
|
|
}
|
|
|
|
private static void WriteLine(string line)
|
|
{
|
|
var xTheLine = line.ToUpper();
|
|
Console.WriteLine(line);
|
|
}
|
|
}
|
|
}
|