public static async Task <XDocument> LoadAsync(P42.SandboxedStorage.IStorageFile storageFile) { if (await storageFile?.ReadAllTextAsync() is string xlmText) { return(XDocument.Parse(xlmText)); } return(null); }
public static async Task <(Vector vector, List <string> warnings)> GenerateAndroidVectorAsync(P42.SandboxedStorage.IStorageFile svgFile) { if (await svgFile.ReadAllTextAsync() is string svgText) { return(GenerateAndroidVector(svgText)); } return(null, new List <string> { "Cannot read text from file [" + svgFile.Path + "]" }); }