* of icalls, do not require an increment.
*/
#pragma warning disable 169
- private const int mono_corlib_version = 153;
+ private const int mono_corlib_version = 162;
#pragma warning restore 169
[ComVisible (true)]
return trace.ToString ();
}
}
-#if !MOBILE
+
/// <summary>
/// Get a fully qualified path to the system directory
/// </summary>
return GetFolderPath (SpecialFolder.System);
}
}
-#endif
+
/// <summary>
/// Get the number of milliseconds that have elapsed since the system was booted
/// </summary>
public extern static string[] GetCommandLineArgs ();
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- internal extern static string internalGetEnvironmentVariable (string variable);
+ internal extern static string internalGetEnvironmentVariable_native (IntPtr variable);
+
+ internal static string internalGetEnvironmentVariable (string variable) {
+ if (variable == null)
+ return null;
+ using (var h = Mono.RuntimeMarshal.MarshalString (variable)) {
+ return internalGetEnvironmentVariable_native (h.Value);
+ }
+ }
/// <summary>
/// Return a string containing the value of the environment
}
}
#else
+ public static string GetEnvironmentVariable (string variable, EnvironmentVariableTarget target)
+ {
+ if (target == EnvironmentVariableTarget.Process)
+ return GetEnvironmentVariable (variable);
+
+ return null;
+ }
+
+ public static IDictionary GetEnvironmentVariables (EnvironmentVariableTarget target)
+ {
+ if (target == EnvironmentVariableTarget.Process)
+ return GetEnvironmentVariables ();
+
+ return (IDictionary)new Hashtable ();
+ }
+
public static void SetEnvironmentVariable (string variable, string value)
{
if (variable == null)
InternalSetEnvironmentVariable (variable, value);
}
+
+ public static void SetEnvironmentVariable (string variable, string value, EnvironmentVariableTarget target)
+ {
+ if (target == EnvironmentVariableTarget.Process)
+ SetEnvironmentVariable (variable, value);
+
+ // other targets ignored
+ }
#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal static extern void InternalSetEnvironmentVariable (string variable, string value);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern static int GetPageSize ();
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ extern private static string get_bundled_machine_config ();
+
+ internal static string GetBundledMachineConfig ()
+ {
+ return get_bundled_machine_config ();
+ }
+
static internal bool IsUnix {
get {
int platform = (int) Environment.Platform;
// Do not include a trailing newline for backwards compatibility
return st.ToString( System.Diagnostics.StackTrace.TraceFormat.Normal );
}
+
+ // Copied from referencesource Environment
+ internal static bool IsWinRTSupported
+ {
+ get
+ {
+ return true;
+ }
+ }
}
}