Skip to content

FromContextAttribute

Forces a parameter to resolve from context hierarchy values.

[AttributeUsage(AttributeTargets.Parameter)]
public sealed class FromContextAttribute : Attribute

Gets or sets a value indicating whether all matching ancestor context objects should be bound.

public bool All { get; init; }

bool