示例#1
0
 public LocalPackageInfo[] ListPackages(Context ctx)
 {
     SwitchToDatabase();
     return(Database.currentDatabase.InstalledRoutes
            .Concat(Database.currentDatabase.InstalledTrains)
            .Concat(Database.currentDatabase.InstalledOther)
            .Select(pack => PackageStructHelper.ToPWPackage(pack))
            .ToArray());
 }
示例#2
0
        public LocalPackageInfo QueryExternalPackage(Context ctx, string path)
        {
            var obPackage = Manipulation.ReadPackage(path);

            if (obPackage == null)
            {
                throw new InvalidDataException();
            }
            return(PackageStructHelper.ToPWPackage(obPackage));
        }