コード例 #1
0
        public static async Task <T> GetOrCreate <T>(this ISimpleFileStore store, StringPath path, Func <T> create = null) where T : class, new()
        {
            var o = await store.Get <T>(path);

            if (o == null)
            {
                o = create == null ? new T() : create();
                await store.Set(path, o);
            }
            return(o);
        }
コード例 #2
0
 Task Save(StoreMd md) => Store.Set(VersionFile, md);