{
[DllImport(Libraries.PlatformConfig, EntryPoint = "tzplatform_getenv", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _GetEnv(int id);
+
[DllImport(Libraries.PlatformConfig, EntryPoint = "tzplatform_getid", CallingConvention = CallingConvention.Cdecl)]
internal static extern int GetId(string name);
}
}
}
-
[EditorBrowsable(EditorBrowsableState.Never)]
public class PlatformConfig
{
- public static string GetEnv(int id)
+ public static int GetId(string name)
{
- return Interop.PlatformConfig.GetEnv(id);
+ return Interop.PlatformConfig.GetId(name);
}
- public static int GetId(string name)
+ public static string GetEnv(int id)
{
- return Interop.PlatformConfig.GetId(name);
+ return Interop.PlatformConfig.GetEnv(id);
}
+
+ public static string GetEnv(string name)
+ {
+ return Interop.PlatformConfig.GetEnv(Interop.PlatformConfig.GetId(name));
+ }
}
}