* of icalls, do not require an increment.
*/
#pragma warning disable 169
- private const int mono_corlib_version = 104;
+ private const int mono_corlib_version = 111;
#pragma warning restore 169
[ComVisible (true)]
ProgramFiles = 0x26,
MyPictures = 0x27,
CommonProgramFiles = 0x2b,
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0
MyVideos = 0x0e,
#endif
#if NET_4_0
string path = line.Substring (delim_index + 1).Trim ('"');
bool relative = false;
- if (path.StartsWith ("$HOME/")) {
+ if (path.StartsWithOrdinalUnchecked ("$HOME/")) {
relative = true;
path = path.Substring (6);
- } else if (!path.StartsWith ("/")) {
+ } else if (!path.StartsWithOrdinalUnchecked ("/")) {
relative = true;
}
case SpecialFolder.Templates:
return ReadXdgUserDir (config, home, "XDG_TEMPLATES_DIR", "Templates");
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0
case SpecialFolder.MyVideos:
return ReadXdgUserDir (config, home, "XDG_VIDEOS_DIR", "Videos");
#endif
return GetLogicalDrivesInternal ();
}
-#if !NET_2_1
+#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private static extern void internalBroadcastSettingChange ();
throw new ArgumentException ("target");
}
}
+#else
+ public static void SetEnvironmentVariable (string variable, string value)
+ {
+ if (variable == null)
+ throw new ArgumentNullException ("variable");
+ if (variable == String.Empty)
+ throw new ArgumentException ("String cannot be of zero length.", "variable");
+ if (variable.IndexOf ('=') != -1)
+ throw new ArgumentException ("Environment variable name cannot contain an equal character.", "variable");
+ if (variable[0] == '\0')
+ throw new ArgumentException ("The first char in the string is the null character.", "variable");
+ InternalSetEnvironmentVariable (variable, value);
+ }
+#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal static extern void InternalSetEnvironmentVariable (string variable, string value);
-#endif
+
[SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode=true)]
public static void FailFast (string message)
{
throw new NotImplementedException ();
}
-#if NET_4_0 || MOONLIGHT || MOBILE
+#if NET_4_0
[SecurityCritical]
public static void FailFast (string message, Exception exception)
{
get { return IntPtr.Size == 8; } // FIXME: is this good enough?
}
- public static bool Is64BitProcess {
- get { return Is64BitOperatingSystem; }
- }
-
public static int SystemPageSize {
get { return GetPageSize (); }
}
#endif
+#if NET_4_0
+ public
+#else
+ internal
+#endif
+ static bool Is64BitProcess {
+ get { return IntPtr.Size == 8; }
+ }
+
public static extern int ProcessorCount {
[EnvironmentPermission (SecurityAction.Demand, Read="NUMBER_OF_PROCESSORS")]
[MethodImplAttribute (MethodImplOptions.InternalCall)]
}
// private methods
-
+#if MOBILE
+ internal const bool IsRunningOnWindows = false;
+#else
internal static bool IsRunningOnWindows {
get { return ((int) Platform < 4); }
}
+#endif
+
#if !NET_2_1
//
// Used by gacutil.exe