Exemple #1
0
        private static async Task <bool> CreatePackageIndexAsync(SleetContext context, JObject serviceIndexJson)
        {
            var packageIndex = context.Source.Get("sleet.packageindex.json");

            AddServiceIndexEntry(context.Source.BaseURI, "sleet.packageindex.json", "http://schema.emgarten.com/sleet#PackageIndex/1.0.0", "Sleet package index.", serviceIndexJson);

            if (!await packageIndex.Exists(context.Log, context.Token))
            {
                var index = new PackageIndex(context);
                await index.InitAsync();

                return(true);
            }

            return(false);
        }