in WindowsSmartInk/Microsoft.MTC.SmartInk/SmartInkMediaPackage.cs [65:85]
public async Task SaveMediaAsync(Guid tagId, IStorageFile file)
{
if (tagId == null || tagId == Guid.Empty)
throw new ArgumentNullException($"{nameof(tagId)} cannot be null or empty.");
if (file == null)
throw new ArgumentNullException($"{nameof(file)} canot be null.");
if (!_manifest.TagList.ContainsKey(tagId))
throw new InvalidOperationException($"Tag:{nameof(tagId)} does not exist");
if (_manifest.IconMap.ContainsKey(tagId))
{
await _provider.DeleteIconAsync(_manifest.IconMap[tagId]);
_manifest.IconMap[tagId] = file.Name;
}
else
_manifest.IconMap.Add(tagId, file.Name);
await _provider.SaveIconAsync( file);
}