}
}
+#if MONO_FEATURE_PROCESS_START
private StreamReader error_stream=null;
bool error_stream_exposed;
start_info = value;
}
}
+#else
+ [Obsolete ("Process.StandardError is not supported on the current platform.", true)]
+ public StreamReader StandardError {
+ get { throw new NotSupportedException ("Process.StandardError is not supported on the current platform."); }
+ }
+
+ [Obsolete ("Process.StandardInput is not supported on the current platform.", true)]
+ public StreamWriter StandardInput {
+ get { throw new NotSupportedException ("Process.StandardInput is not supported on the current platform."); }
+ }
+
+ [Obsolete ("Process.StandardOutput is not supported on the current platform.", true)]
+ public StreamReader StandardOutput {
+ get { throw new NotSupportedException ("Process.StandardOutput is not supported on the current platform."); }
+ }
+
+ [Obsolete ("Process.StartInfo is not supported on the current platform.", true)]
+ public ProcessStartInfo StartInfo {
+ get { throw new NotSupportedException ("Process.StartInfo is not supported on the current platform."); }
+ set { throw new NotSupportedException ("Process.StartInfo is not supported on the current platform."); }
+ }
+#endif // MONO_FEATURE_PROCESS_START
/* Returns the process start time in Windows file
* times (ticks from DateTime(1/1/1601 00:00 GMT))
// the process (currently we have none).
}
+#if MONO_FEATURE_PROCESS_START
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static bool ShellExecuteEx_internal(ProcessStartInfo startInfo,
ref ProcInfo proc_info);
psi.UseShellExecute = false;
return Start(psi);
}
+#else
+ [Obsolete ("Process.Start is not supported on the current platform.", true)]
+ public bool Start ()
+ {
+ throw new NotSupportedException ("Process.Start is not supported on the current platform.");
+ }
+
+ [Obsolete ("Process.Start is not supported on the current platform.", true)]
+ public static Process Start (ProcessStartInfo startInfo)
+ {
+ throw new NotSupportedException ("Process.Start is not supported on the current platform.");
+ }
+
+ [Obsolete ("Process.Start is not supported on the current platform.", true)]
+ public static Process Start (string fileName)
+ {
+ throw new NotSupportedException ("Process.Start is not supported on the current platform.");
+ }
+
+ [Obsolete ("Process.Start is not supported on the current platform.", true)]
+ public static Process Start(string fileName, string arguments)
+ {
+ throw new NotSupportedException ("Process.Start is not supported on the current platform.");
+ }
+
+ [Obsolete ("Process.Start is not supported on the current platform.", true)]
+ public static Process Start(string fileName, string username, SecureString password, string domain)
+ {
+ throw new NotSupportedException ("Process.Start is not supported on the current platform.");
+ }
+
+ [Obsolete ("Process.Start is not supported on the current platform.", true)]
+ public static Process Start(string fileName, string arguments, string username, SecureString password, string domain)
+ {
+ throw new NotSupportedException ("Process.Start is not supported on the current platform.");
+ }
+#endif // MONO_FEATURE_PROCESS_START
public override string ToString()
{
if (!WaitForExit_internal (process_handle, ms))
return false;
+#if MONO_FEATURE_PROCESS_START
if (async_output != null && !async_output.IsCompleted)
async_output.AsyncWaitHandle.WaitOne ();
if (async_error != null && !async_error.IsCompleted)
async_error.AsyncWaitHandle.WaitOne ();
+#endif // MONO_FEATURE_PROCESS_START
OnExited ();
cb (this, new DataReceivedEventArgs (str));
}
+#if MONO_FEATURE_PROCESS_START
[Flags]
enum AsyncModes {
NoneYet = 0,
error_canceled = true;
}
+#else
+ [Obsolete ("Process.BeginOutputReadLine is not supported on the current platform.", true)]
+ public void BeginOutputReadLine ()
+ {
+ throw new NotSupportedException ("Process.BeginOutputReadLine is not supported on the current platform.");
+ }
+
+ [Obsolete ("Process.BeginOutputReadLine is not supported on the current platform.", true)]
+ public void CancelOutputRead ()
+ {
+ throw new NotSupportedException ("Process.BeginOutputReadLine is not supported on the current platform.");
+ }
+
+ [Obsolete ("Process.BeginOutputReadLine is not supported on the current platform.", true)]
+ public void BeginErrorReadLine ()
+ {
+ throw new NotSupportedException ("Process.BeginOutputReadLine is not supported on the current platform.");
+ }
+
+ [Obsolete ("Process.BeginOutputReadLine is not supported on the current platform.", true)]
+ public void CancelErrorRead ()
+ {
+ throw new NotSupportedException ("Process.BeginOutputReadLine is not supported on the current platform.");
+ }
+#endif // MONO_FEATURE_PROCESS_START
[Category ("Behavior")]
[MonitoringDescription ("Raised when this process exits.")]
// If this is a call to Dispose,
// dispose all managed resources.
if (disposing) {
+#if MONO_FEATURE_PROCESS_START
/* These have open FileStreams on the pipes we are about to close */
if (async_output != null)
async_output.Close ();
error_stream.Close ();
error_stream = null;
}
+#endif // MONO_FEATURE_PROCESS_START
}
// Release unmanaged resources
}
}
+#if MONO_FEATURE_PROCESS_START
[Test] // Start ()
public void Start1_FileName_Empty ()
{
Assert.AreEqual (1, exitedCalledCounter);
}
-
ProcessStartInfo GetCrossPlatformStartInfo ()
{
if (RunningOnUnix) {
} else
return new ProcessStartInfo ("help", "");
}
+#endif // MONO_FEATURE_PROCESS_START
[Test]
public void ProcessName_NotStarted ()
Assert.IsNull (e.InnerException, "IOE inner exception should be null");
}
+#if MONO_FEATURE_PROCESS_START
[Test]
[NUnit.Framework.Category ("MobileNotWorking")]
public void ProcessName_AfterExit ()
Assert.IsNull (e.InnerException, "IOE inner exception should be null");
}
+#endif // MONO_FEATURE_PROCESS_START
[Test]
public void Handle_ThrowsOnNotStarted ()
Assert.IsFalse (Process.GetCurrentProcess ().HasExited);
}
+#if MONO_FEATURE_PROCESS_START
[Test]
[NUnit.Framework.Category ("MobileNotWorking")]
public void DisposeWithDisposedStreams ()
p.StandardInput.Write ('x');
}
}
+#endif // MONO_FEATURE_PROCESS_START
[Test]
public void Modules () {