using System.Collections.Generic; using System.Threading.Tasks; using zero.Core.Entities; namespace zero.Core.Routing { public interface INewRouteProvider where T : IZeroRouteEntity { string Alias { get; } /// /// Warmup is only called once. /// Task Warmup(); /// /// Generate unique route ID for a model /// string Id(T model); /// /// Build URL for a model /// string Url(T model); /// /// Create route entity from a model /// Route Create(T model); /// /// /// //bool HasChanged(T newModel, T oldModel); /// /// Get all models which should be provided and handled by this instance /// Task> All(); /// /// Build a resolved route from a route response /// Task Resolve(RouteResponse response); } }