Beispiel #1
0
        public Package GetElementsByPackage(Path path)
        {
            EA.Package rootPackage = (EA.Package)_repository.Repository.Models.GetAt(0);
            EA.Package eaPackage   = rootPackage.GetPackage(path);
            Package    package     = FromEaPackage(eaPackage, path);
            var        file        = FileNames.GetPackage(_folder, path);

            _jsonSerializer.Value.SerializeToFile(package, file.AbsolutePath);
            return(package);
        }
Beispiel #2
0
        public Package GetElementsByPackage(Path path)
        {
            File file = FileNames.GetPackage(_folder, path);

            if (file.Exists())
            {
                Package package;
                try
                {
                    package = _jsonSerializer.Value.DeserializeFromFile <Package>(file.AbsolutePath);
                }
                catch (JsonReaderException jre)
                {
                    return(null);
                }
                return(package);
            }
            return(null);
        }
Beispiel #3
0
        public bool IsValidPackagePath(Path packagePath, IFolder imageFolder)
        {
            File file = FileNames.GetPackage(_folder, packagePath);

            return(file.Exists());
        }