Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Unified Diff: sdk/lib/io/process.dart

Issue 1068803002: Make the construction of a ProcessResult public (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/process.dart
diff --git a/sdk/lib/io/process.dart b/sdk/lib/io/process.dart
index 2d8ecab3bba56e1471548cbce7d1398f65e6c78f..7f05c4824b655cd31a42dd6ae59da3f81a914a60 100644
--- a/sdk/lib/io/process.dart
+++ b/sdk/lib/io/process.dart
@@ -433,14 +433,14 @@ abstract class Process {
* [ProcessResult] represents the result of running a non-interactive
* process started with [:Process.run:].
Lasse Reichstein Nielsen 2015/04/07 12:38:44 [:Process.run:] -> [Process.run] or [Process.runSy
Søren Gjesse 2015/04/07 13:05:35 Done.
*/
-abstract class ProcessResult {
+class ProcessResult {
/**
* Exit code for the process.
*
* See [Process.exitCode] for more information in the exit code
* value.
*/
- int get exitCode;
+ final int exitCode;
/**
* Standard output from the process. The value used for the
@@ -448,7 +448,7 @@ abstract class ProcessResult {
* `null` was used this value is of type `List<int> otherwise it is
* of type `String`.
Lasse Reichstein Nielsen 2015/04/07 12:38:45 Make ProcessResult generic with the type of this a
Søren Gjesse 2015/04/07 13:05:35 One can specify different encodings for stdout and
*/
- get stdout;
+ final stdout;
/**
* Standard error from the process. The value used for the
@@ -456,12 +456,24 @@ abstract class ProcessResult {
* `null` was used this value is of type `List<int>
* otherwise it is of type `String`.
*/
- get stderr;
+ final stderr;
/**
* Process id from the process.
Lasse Reichstein Nielsen 2015/04/07 12:38:44 Process id of the process ?
Søren Gjesse 2015/04/07 13:05:35 Done.
*/
- int get pid;
+ final int pid;
+
+ /**
+ * Construct an instance of [ProcessResult].
+ *
+ * The main use of `ProcessResult is as return value from
+ * `Process.run` and `Process.runSync`. However for some applications
Lasse Reichstein Nielsen 2015/04/07 12:38:44 Comma after "however". Maybe rewrite to something
Søren Gjesse 2015/04/07 13:05:35 I removed the comment.
+ * constructing it directly might be useful.
+ */
+ const ProcessResult(int this.pid,
Lasse Reichstein Nielsen 2015/04/07 12:38:44 Remove the `const` if possible. It makes little-to
Søren Gjesse 2015/04/07 13:05:35 Done.
+ int this.exitCode,
+ this.stdout,
+ this.stderr);
}
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698