You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I add a parameter of any custom type and want to retrieve the parameter by its parent type then an exception is thrown. This exception indicates that the type must implement IConvertible in order to be able to return a value. This is incorrect. Since the object added to NavigationParameters is an inheritor of the type I passed as generic type parameter there is no need to inherit from IConvertible. The value can immediately be returned
Error
public class Test : ICustomInterface{}
NavigationParameters np = new NavigationParameters ();
np.Add("Test", new Test());
np.GetValue<object>(); //this line is not possible
np.GetValue<ICustomInterface>(); //this line is not possible
Both lines results in:
System.InvalidCastException: Object must implement IConvertible
The text was updated successfully, but these errors were encountered:
@brianlagunas I have updated the initial post. Unfortunately the <> brackets were not rendered in the final output.
The reflection call is not inside the commands. Should only be called when accessing NavigationParameters
Package info
Repro steps
If I add a parameter of any custom type and want to retrieve the parameter by its parent type then an exception is thrown. This exception indicates that the type must implement IConvertible in order to be able to return a value. This is incorrect. Since the object added to NavigationParameters is an inheritor of the type I passed as generic type parameter there is no need to inherit from IConvertible. The value can immediately be returned
Error
Both lines results in:
The text was updated successfully, but these errors were encountered: