mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Cosmos.IL2CPU.Plugs;
|
|
|
|
namespace Cosmos.IL2CPU.IL.CustomImplementations.System
|
|
{
|
|
[Plug(Target=typeof(Environment))]
|
|
public static class EnvironmentImpl
|
|
{
|
|
[PlugMethod(Signature = "System_Environment_OSName__System_Environment_get_OSInfo__")]
|
|
public static int get_OSName() { return 0x82; }
|
|
|
|
public static string GetResourceFromDefault(string aResource)
|
|
{
|
|
if (aResource == "ArgumentNull_Generic")
|
|
{
|
|
return "Parameter was null!";
|
|
}
|
|
if (aResource == "Arg_ParamName_Name")
|
|
{
|
|
return "Parameter name: {0}";
|
|
}
|
|
Console.Write("Getting resource: '");
|
|
Console.Write(aResource);
|
|
Console.WriteLine("'");
|
|
Console.ReadLine();
|
|
return aResource;
|
|
}
|
|
|
|
public static string GetResourceString(string key,
|
|
params object[] values)
|
|
{
|
|
return key;
|
|
}
|
|
|
|
public static string GetResourceString(string aResource)
|
|
{
|
|
return GetResourceFromDefault(aResource);
|
|
}
|
|
|
|
}
|
|
|
|
}
|