Example #1
0
        public AsyncCheck FlushAsync()
        {
            AsyncCheck loading = new AsyncCheck();

            WriteToJson();
            var task = WriteToFileAsync();

            task.ContinueWith(t =>
            {
                loading.SetDone();
            });

            return(loading);
        }
Example #2
0
        public AsyncCheck ReloadAsync()
        {
            AsyncCheck loading = new AsyncCheck();

            var task = ReadFromFileAsync();

            task.ContinueWith(t =>
            {
                Json = (JObject)t.Result;
                ReadFromJson();
                loading.SetDone();
            });

            return(loading);
        }