in WindowsSmartInk/Microsoft.MTC.SmartInk/LocalAppDataProvider.cs [79:109]
public async Task<ISmartInkPackage> GetPackageAsync(IStorageFolder packageFolder)
{
if (packageFolder == null)
throw new ArgumentNullException($"{nameof(packageFolder)} cannot be null.");
//if (_root == null)
// _root = await GetRootFolderAsync();
//var packageFolder = await _root.GetFolderAsync(packagename);
//if (packageFolder == null)
// return null;
if (!File.Exists($"{packageFolder.Path}\\manifest.json"))
return null;
var package = await packageFolder.GetFileAsync("manifest.json");
if (package == null)
return null;
var json = await FileIO.ReadTextAsync(package);
if (string.IsNullOrWhiteSpace(json))
return new SmartInkMediaPackage(packageFolder.Name, GetPackageStorageProviderAsync(packageFolder));
var manifest = JsonConvert.DeserializeObject<SmartInkManifest>(json);
if (manifest.IsMediaPackage)
return new SmartInkMediaPackage(manifest, GetPackageStorageProviderAsync(packageFolder));
else
return new SmartInkPackage(manifest, GetPackageStorageProviderAsync(packageFolder));
}