using Optional; namespace OO2; public enum OfferingType { Course, Ebook, Book, Template, OfflineCourse, } public abstract class Product(int id, OfferingType type) { } public class DownloadableProduct(int id, OfferingType type) : Product(id, type) { public Option<string> GetDefaultDownloadFileName() { return Option.Some("Some Value"); } public Option<string> GetDownloadUrl() { return Option.Some("Some Value"); } } public sealed class ProductHandler() { public void DoStuff(DownloadableProduct product) { var fileName = product.GetDefaultDownloadFileName(); var downloadUrl = product.GetDownloadUrl(); } }