From 52140d52210eda0f25ecab9f89b5c73473e9d8e0 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 17 Apr 2016 18:57:29 +0100 Subject: Add CLI for .NET version --- dotnet/Mammoth/Couscous/java/io/Closeable.cs | 7 +++---- dotnet/Mammoth/Couscous/java/io/File.cs | 15 +++++++++++++++ dotnet/Mammoth/Couscous/java/io/InputStream.cs | 2 +- dotnet/Mammoth/Couscous/java/nio/file/Path.cs | 11 +++++++---- 4 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 dotnet/Mammoth/Couscous/java/io/File.cs (limited to 'dotnet/Mammoth/Couscous/java') diff --git a/dotnet/Mammoth/Couscous/java/io/Closeable.cs b/dotnet/Mammoth/Couscous/java/io/Closeable.cs index 36b2a80..9dc10c5 100644 --- a/dotnet/Mammoth/Couscous/java/io/Closeable.cs +++ b/dotnet/Mammoth/Couscous/java/io/Closeable.cs @@ -1,9 +1,8 @@ using System; -namespace Mammoth.Couscous.java.io -{ - internal interface Closeable - { +namespace Mammoth.Couscous.java.io { + internal interface Closeable { + void close(); } } diff --git a/dotnet/Mammoth/Couscous/java/io/File.cs b/dotnet/Mammoth/Couscous/java/io/File.cs new file mode 100644 index 0000000..abff40a --- /dev/null +++ b/dotnet/Mammoth/Couscous/java/io/File.cs @@ -0,0 +1,15 @@ +using Mammoth.Couscous.java.nio.file; + +namespace Mammoth.Couscous.java.io { + internal class File { + internal string Path { get; } + + internal File(string path) { + Path = path; + } + + internal Path toPath() { + return new Path(Path); + } + } +} diff --git a/dotnet/Mammoth/Couscous/java/io/InputStream.cs b/dotnet/Mammoth/Couscous/java/io/InputStream.cs index 9609a2b..b474bb8 100644 --- a/dotnet/Mammoth/Couscous/java/io/InputStream.cs +++ b/dotnet/Mammoth/Couscous/java/io/InputStream.cs @@ -1,5 +1,5 @@ namespace Mammoth.Couscous.java.io { internal interface InputStream { - + System.IO.Stream Stream { get; } } } diff --git a/dotnet/Mammoth/Couscous/java/nio/file/Path.cs b/dotnet/Mammoth/Couscous/java/nio/file/Path.cs index 6c85cc8..032b4bb 100644 --- a/dotnet/Mammoth/Couscous/java/nio/file/Path.cs +++ b/dotnet/Mammoth/Couscous/java/nio/file/Path.cs @@ -1,9 +1,12 @@ using System; -namespace Mammoth.Couscous.java.nio.file -{ - internal class Path - { +namespace Mammoth.Couscous.java.nio.file { + internal class Path { + private readonly string _path; + + internal Path(string path) { + _path = path; + } } } -- cgit v1.2.3