Expand description
ferroui-static-view-locator-macros
The attributes of ferroui-static-view-locator: static_view_locator ([StaticViewLocator])
and static_view_mapping ([StaticViewMapping]). Use them through
ferroui_static_view_locator, which re-exports them.
The attributes do not generate the locator: a proc macro sees one item and cannot find the
view models and views of the crate. The build script of the crate does
(ferroui-static-view-locator-build), and writes one file per locator below OUT_DIR;
static_view_locator checks its options, writes the struct, and includes that file, whose
impl blocks extend the struct (the partial class of the reference).
Attribute Macrosยง
- static_
view_ locator - Makes a struct a view locator generated at build time (
[StaticViewLocator]). - static_
view_ mapping - Maps a view model type to a view type on a locator (
[StaticViewMapping(typeof(VM), typeof(V))]): the final override of the mapping of the view model, for types that do not follow the naming rules. Repeatable; the types are named as in the module of the locator.