BuildPackage() public static method

public static BuildPackage ( IPackageMetadata metadata, IEnumerable files ) : IPackage
metadata IPackageMetadata
files IEnumerable
return IPackage
Beispiel #1
0
        public IEnumerable <PackageIssue> Validate()
        {
            var package         = PackageHelper.BuildPackage(PackageMetadata, GetFiles());
            var packageFileName = Path.IsPathRooted(PackageSource) ? Path.GetFileName(PackageSource) : null;

            return(package.Validate(_packageRules.Select(r => r.Value), packageFileName));
        }
Beispiel #2
0
        private void PackageCommandExecute(LazyPackageCommand packageCommand)
        {
            var package = PackageHelper.BuildPackage(PackageMetadata, GetFiles());

            try
            {
                packageCommand.Value.Execute(package, PackageSource);
            }
            catch (Exception ex)
            {
                UIServices.Show("The command failed with this error message:" +
                                Environment.NewLine +
                                Environment.NewLine +
                                ex.Message, MessageLevel.Error);
            }
        }