Пример #1
0
        public Logger( )
        {
            fileName = $"LOG (v_{AppDataFolder.GetVersion()}) {DateTime.Now.ToString("G").Replace(':', '-').Replace("/", "-")}.txt";

            filePath = AppDataFolder.GetPath(Path.Combine(folderName, subFolderName, fileName));

            AppDataFolder.Views.Add(new Util.FolderView(folderName, new Util.FolderView(subFolderName, null)));
        }
Пример #2
0
        public static void Init(Logger _logger)
        {
            isInit = true;
            logger = _logger;
            logger.Log(Logger.LogType.Event, Logger.LogLevel.Info, "static:DataLayer.Init()", "Call");

            AppDataFolder.Views.Add(new FolderView("data", new FolderView("monthly")));

            dailyMeasures = new BinarySerializer <List <NetworkMeasure> >(AppDataFolder.GetPath(@"data\monthly\.measures"));
            dailyMeasures.Set(new List <NetworkMeasure>()
            {
                new NetworkMeasure()
            });
        }