Skip to content

Commit 584607b

Browse files
committed
Touch up ReadFromUri program
1 parent 4f238e6 commit 584607b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/ReadFromUri/ReadFromUri.cs renamed to examples/ReadFromUri/Program.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
using TagLib;
55

6-
public class ReadFromUri
6+
namespace ReadFromUri;
7+
public class Program
78
{
89
public static void Write (string name, object value)
910
{
@@ -30,8 +31,8 @@ public static void Main (string[] args)
3031
TagLib.File file;
3132

3233
try {
33-
var file_info = new FileInfo (uri);
34-
uri = new Uri (file_info.FullName).ToString ();
34+
var fileInfo = new FileInfo (uri);
35+
uri = new Uri (fileInfo.FullName).ToString ();
3536
} catch {
3637
}
3738

@@ -136,8 +137,5 @@ public FileAbstraction (string file)
136137

137138
public Stream WriteStream => new FileStream (Name, FileMode.Open);
138139

139-
public void CloseStream (Stream stream)
140-
{
141-
stream.Close ();
142-
}
140+
public void CloseStream (Stream stream) => stream.Close ();
143141
}

0 commit comments

Comments
 (0)