using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AntDesign { public class ImageService { public event Action ImagePreviewOpened; public event Action ImagePreviewClosed; public ImageRef OpenImages(IList images) { if (images?.Any() != true) return null; var imageRef = new ImageRef(images, this); ImagePreviewOpened?.Invoke(imageRef); return imageRef; } public void CloseImage(ImageRef iamgeRef) { ImagePreviewClosed?.Invoke(iamgeRef); } } }