Skip to content

ViewModelViewHostUnsafe class

Attributes: [RequiresDynamicCode("ViewModelViewHostUnsafe asks the service locator for IViewFor<> closed over the view model's run-time type. Use ViewModelViewHost, which uses the generated view lookup and Map registrations, to stay ahead-of-time safe.")] [DebuggerDisplay("{ViewModel}, {DefaultContent}")]

Defined in

Namespace: ReactiveUI.Reactive Assembly: ReactiveUI.Reactive.dll Full name: ReactiveUI.Reactive.ViewModelViewHostUnsafe Modifiers: public

Summary

View source

A ViewModelViewHost that also finds views registered only with the service locator.

Applies to

net10.0-ios26.0, net10.0-maccatalyst26.0, net10.0-tvos26.0, net10.0-macos26.0, net10.0-windows7.0, net10.0-windows10.0.19041, net10.0-windows10.0.19041, net9.0-windows7.0, net9.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows7.0, net8.0-windows10.0.19041, net8.0-windows10.0.19041, net462, net481

Class hierarchy
classDiagram
class ViewModelViewHostUnsafe
class ViewModelViewHost
ViewModelViewHost <|-- ViewModelViewHostUnsafe

Inherits from: ViewModelViewHost

Remarks

ViewModelViewHost asks the view locator's generated view lookup and its Map registrations. This twin asks those first, then the service locator for IViewFor closed over the view model's run-time type.

Closing a generic type at run time needs code the compiler never generated, so this type is not safe to compile ahead of time. Use ViewModelViewHost when you can.

Constructors

NameSummary
.ctorInitializes a new instance of the [ViewModelViewHostUnsafe](# class.
Inherited members