using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SmartCoalApplication.Base { public abstract class ImageResource : Resource { private sealed class FromImageResource : ImageResource { protected override Image Load() { return (Image)Reference.Clone(); } public FromImageResource(Image image) : base(image) { } } public static ImageResource FromImage(Image image) { if (image == null) { throw new ArgumentNullException("image"); } ImageResource resource = new FromImageResource(image); return resource; } protected ImageResource() : base() { } protected ImageResource(Image image) : base(image) { } } }