Open jeremydmiller opened 2 years ago
Some notes:
Introduce back some sort of EndpointCollection as a child of JasperRuntime. That would hold the policies.
EndpointCollection
JasperRuntime
public interface IEndpointPolicy { void Apply(Endpoint endpoint, IJasperRuntime runtime); } internal class LambdaEndpointPolicy<T> : IEndpointPolicy where T : Endpoint { private readonly Action<T, IJasperRuntime> _configure; public LambdaEndpointPolicy(Action<T, IJasperRuntime> configure) { _configure = configure; } public void Apply(Endpoint endpoint, IJasperRuntime runtime) { if (endpoint is T e) _configure(e, runtime); } }
Some notes:
Introduce back some sort of
EndpointCollection
as a child ofJasperRuntime
. That would hold the policies.