Skip to main content

IArlecchinoViewFactory interface

Namespace: Arlecchino.Navigation · Assembly: Arlecchino

Builds views for routes. Register one with AddViewFactory<T>() to serve a whole family of routes at once — a plugin directory, or routes carrying an ID in the name.

public interface IArlecchinoViewFactory

Methods

MemberSummary
TryCreate(IServiceProvider, ViewRoute, out IArlecchinoView)Creates the view for a route.

Methods in detail

TryCreate(IServiceProvider, ViewRoute, out IArlecchinoView)

public bool TryCreate(IServiceProvider services, ViewRoute route, out IArlecchinoView? view);

Creates the view for a route.

Parameters

NameTypeDescription
servicesIServiceProviderThe scope this screen lives in. Resolve from it rather than from a captured container, so scoped services belong to the screen and go away with it.
routeViewRouteThe route being shown.
viewIArlecchinoViewThe view, when this factory owns the route.

Returns boolfalse for a route you do not own, so the next factory gets a turn.