Пример #1
0
        public async Task Add(string filename)
        {
            var metadata = await ApplicationPackageTools.GetMetadataAsync(filename);

            if (metadata == null)
            {
                throw new Exception("No metadata file found in package!");
            }

            await base.Add(filename, metadata);
        }
Пример #2
0
        private void PackageClient_OnPushApplicationPackage(string filename, RemoteTaskCompletionSource taskHandle)
        {
            Task.Run(async() => {
                var metadata = await ApplicationPackageTools.GetMetadataAsync(filename);
                if (metadata == null)
                {
                    throw new ApplicationException($"Invalid Project Package '{filename}'! No metadata found.");
                }

                await applicationPackages.Add(filename);
                PushedApplicationPackageList.Add(new PackageReference(metadata.Id, metadata.Version));
            }).ContinueWith(taskHandle.FromTask);
        }