[IcosCfg(Cfg.ServiceType, ServiceType.Stateless)] [IcosCfg(Cfg.LoadBalanceStrategy, LoadBalanceStrategy.RoundRobin)] [IcosCfg(Cfg.Protocol, Protocol.Http)] [IcosCfg(Cfg.Domain, "{{slug}}.hatchery.cloud")] [IcosCfg(Cfg.DomainPath, "/")] public interface ITimeApi { [IcosHttpPath("/")] HttpResponse Index(HttpRequest req); } [IcosCfg(Cfg.ServiceType, ServiceType.Stateless)] [IcosCfg(Cfg.LoadBalanceStrategy, LoadBalanceStrategy.RoundRobin)] [IcosCfg(Cfg.Protocol, Protocol.Icp)] public interface ITimeProvider { string GetTime(); } public class TimeApi : ITimeApi { private ITimeProvider _provider; public HttpResponse Index(HttpRequest req) { return new HttpResponse("Time: " + _provider.GetTime()); } } public class TimeProvider : ITimeProvider { public string GetTime() { return DateTime.Now.ToString(); } }