Vixen
dd8b0a81
csharp
public record class BoundProvide

An ambient value put on the element the tag was written in.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ The key is written out and cannot be inferred, and that is not a limitation of this tag. Provide<T> keys on the type argument rather than on the value's runtime type — deliberately, so an interface is the useful key and a subclass cannot shadow its base — so an inferred key would be the concrete class every time and Inject<ITheme> would find nothing. The binder could not infer it in any case: it never touches the compilation.

⚠ Provided in document order, which is what makes the ordering readable rather than magic. The emitter writes nodes in the order they are written, so a <provide> above its siblings is in place before any of them is built and one written below them is not. That is the same rule an author already reads the file by.

Fields and properties (2)

  • public string Type

    The key, as the author wrote it. Verbatim C#; the binder does not resolve it.

  • public BoundExpression Value

    What is provided.

Methods (1)

  • public BoundProvide(string Type, BoundExpression Value)

    An ambient value put on the element the tag was written in.

Used by (3)

  • BinderVixen.Ui.Markup
  • BinderTestsVixen.Ui.Markup.Tests
  • ComponentEmitterVixen.Ui.Markup