Table of Contents

Class ViewLocatorNotFoundException

Namespace
ReactiveUI
Assembly
ReactiveUI.dll

An exception that is thrown if ReactiveUI fails to locate an IViewLocator implementation.

public class ViewLocatorNotFoundException : Exception, ISerializable
Inheritance
ViewLocatorNotFoundException
Implements
Inherited Members
Extension Methods
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>, bool)

Examples

try
{
    var view = ViewLocator.Current.ResolveView(viewModel);
}
catch (ViewLocatorNotFoundException ex)
{
    logger.LogCritical(ex, "ReactiveUI was not initialized; cannot resolve views.");
}

Remarks

This exception typically indicates that the application's dependency resolver has not been initialized via UseReactiveUI, services.AddReactiveUI(), or custom DI registration. It can also surface when assemblies containing the default locator are trimmed out of the app package. Catch the exception at startup to log configuration issues and ensure the container registers an IViewLocator before resolving views.

Constructors

ViewLocatorNotFoundException()

Initializes a new instance of the ViewLocatorNotFoundException class.

public ViewLocatorNotFoundException()

ViewLocatorNotFoundException(string)

Initializes a new instance of the ViewLocatorNotFoundException class.

public ViewLocatorNotFoundException(string message)

Parameters

message string

A user friendly message.

ViewLocatorNotFoundException(string, Exception)

Initializes a new instance of the ViewLocatorNotFoundException class.

public ViewLocatorNotFoundException(string message, Exception innerException)

Parameters

message string

A user friendly message.

innerException Exception

Any exception this exception is wrapping.