Method
Router.MapInstance
MapInstance(object) #
Maps route methods from an object instance.
[RequiresUnreferencedCode("This method requires access to unreferenced code, which may break AOT compilation and trimming. Use the SetObject(Type, Object) or SetObject<TObject>(TObject) overloads instead.")]
public void MapInstance(object instance)Parameters #
instance object
The instance whose route methods will be mapped.
MapInstance<TInstance>() #
Maps route methods from a new instance of TInstance.
public void MapInstance<TInstance>() where TInstance : notnull, new()Type Parameters #
TInstance
The type whose route methods will be mapped.