Exemple #1
0
        public override void ReplaceItem(dynamic item)
        {
            var serializedItem = JsonObjectSerializer.Formated.Serialize(item);

            File.WriteAllBytes(PackageMetadataLoader.GetMenuPath(ConfigId, item.Name), serializedItem);

            PackageMetadataLoader.UpdateCache();
        }
Exemple #2
0
        public override void DeleteItem(string itemId)
        {
            var menuDirectory = Path.GetDirectoryName(PackageMetadataLoader.GetMenuPath(ConfigId, itemId));

            if (menuDirectory != null)
            {
                Directory.Delete(menuDirectory, true);
                PackageMetadataLoader.UpdateCache();
            }
        }