Merge pull request #2338 from BogdanovKirill/httpwritefix3
[mono.git] / mcs / class / corlib / Mono / Runtime.cs
index 953c63fc2a16929915d7de6d2d1401b3be8c06ac..7a5f9887c6334fff01b0f7f9835659b44fac9be3 100644 (file)
 // distribute, sublicense, and/or sell copies of the Software, and to
 // permit persons to whom the Software is furnished to do so, subject to
 // the following conditions:
-// 
+//
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
-// 
+//
 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -31,12 +31,15 @@ using System.Runtime.CompilerServices;
 
 namespace Mono {
 
-       internal class Runtime
+#if MOBILE
+       public
+#endif
+       static class Runtime
        {
-               
+
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                private static extern void mono_runtime_install_handlers ();
-               
+
                static internal void InstallSignalHandlers ()
                {
                        mono_runtime_install_handlers ();
@@ -46,20 +49,20 @@ namespace Mono {
                // Safe to be called using reflection
                // Format is undefined only for use as a string for reporting
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               internal static extern string GetDisplayName ();
+#if MOBILE
+               public
+#else
+               internal
+#endif
+               static extern string GetDisplayName ();
 
-               /*
-               Create a object without calling any of it's constructors.
-               @h is a pointer to the runtime type handle of that object.              
-               Recomended usage is to emit the following code sequence:
-               ldtoken [mscorlib]System.Object
-               call object [mscorlib]Mono.Runtime::NewObject(intptr)
-
-               This is the only well understood sequence known by the JIT
-               which produces faster code.
-               */
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               internal static extern object NewObject (RuntimeTypeHandle h);
+               static extern string GetNativeStackTrace (Exception exception);
+
+               public static bool SetGCAllowSynchronousMajor (bool flag)
+               {
+                       // No longer used
+                       return true;
+               }
        }
-       
 }