Added SZ singleton and services
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
using System;
|
||||
using SzCore;
|
||||
using SzCore.Defaults;
|
||||
|
||||
namespace SzCli;
|
||||
|
||||
public class Program
|
||||
{
|
||||
private static readonly ISzFileManager _fileManager = new LocalFileManager();
|
||||
private static readonly ISzLogger _logger = new Logger(_fileManager);
|
||||
private static readonly DefaultLocalFileManager _fileManager = new();
|
||||
private static readonly Logger _logger = new(_fileManager);
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
@@ -24,6 +25,6 @@ public class Program
|
||||
var loadedDataset = parser.LoadDataset(dataset.Id);
|
||||
_logger.Log($"Successfully loaded dataset? {loadedDataset != null}. Id is {loadedDataset?.Id}");
|
||||
|
||||
_logger.Log(loadedDataset?.DataObjects["test"].Fields["value"].Value);
|
||||
_logger.Log(loadedDataset?.DataObjects["test"].Fields["value"].Value ?? "Could not get value of test.value");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user