Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Achilleas Anagnostopoulos
committed
May 3, 2015
1 parent
caa49ee
commit 8c25320
Showing
3 changed files
with
203 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
library test.proto.msgpack; | ||
|
||
import "package:msgpack/msgpack.dart"; | ||
|
||
class Invert extends Message { | ||
bool flag; | ||
|
||
Invert(this.flag); | ||
|
||
List toList() => [flag]; | ||
|
||
static Invert fromList(List fields) => new Invert(fields[0]); | ||
} | ||
|
||
class RpcError extends Message { | ||
String message; | ||
|
||
RpcError(this.message); | ||
|
||
List toList() => [message]; | ||
|
||
static RpcError fromList(List fields) => new RpcError(fields[0]); | ||
|
||
String toString() { | ||
return "RpcError: ${message}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters