using System.Security.Permissions;
using System.Text;
using System.Runtime.InteropServices;
+using System.Threading;
namespace System {
* of icalls, do not require an increment.
*/
#pragma warning disable 169
- private const int mono_corlib_version = 96;
+ private const int mono_corlib_version = 108;
#pragma warning restore 169
[ComVisible (true)]
Directory.SetCurrentDirectory (value);
}
}
+
+#if NET_4_5
+ public static int CurrentManagedThreadId {
+ get {
+ return Thread.CurrentThread.ManagedThreadId;
+ }
+ }
+#endif
/// <summary>
/// Gets or sets the exit code of this process
// If value not found, add %FOO to stream,
// and use the closing % for the next iteration.
// If value found, expand it in place of %FOO%
+ int realOldOff2 = off2;
if (value == null) {
result.Append ('%');
result.Append (var);
// If value not found in current iteration, but a % was found for next iteration,
// use text from current closing % to the next %.
else
- textLen = off1 - oldOff2;
+ textLen = off1 - realOldOff2;
if(off1 >= oldOff2 || off1 == -1)
result.Append (name, oldOff2+1, textLen);
} while (off2 > -1 && off2 < len);
return Path.Combine (home, "Library", "Caches");
else
return String.Empty;
-
+
+#if NET_4_0
+ // #2873
+ case SpecialFolder.UserProfile:
+ return home;
+#endif
+
case SpecialFolder.Programs:
case SpecialFolder.SendTo:
case SpecialFolder.StartMenu:
case SpecialFolder.CommonDesktopDirectory:
case SpecialFolder.PrinterShortcuts:
case SpecialFolder.Windows:
- case SpecialFolder.UserProfile:
case SpecialFolder.SystemX86:
case SpecialFolder.ProgramFilesX86:
case SpecialFolder.CommonProgramFilesX86:
return (platform == 4 || platform == 128 || platform == 6);
}
}
+ static internal bool IsMacOS {
+ get {
+ return Environment.Platform == PlatformID.MacOSX;
+ }
+ }
}
}