FreshMvvm icon indicating copy to clipboard operation
FreshMvvm copied to clipboard

IPageModelCoreMethods missing method PushPageModel(Type pageModelType, object data, bool modal = false, bool animate = true)

Open josh-cunningham opened this issue 5 years ago • 1 comments

The PushPageModel method that allows us to use page model type argument with data is missing from the Core Methods interface. I am using the latest nuget package. I have added the following extension method successfully so it appears to just be an issue with the interface, unless I'm missing something. Thanks.

public static async Task PushPageModel(this IPageModelCoreMethods iCoreMethods, Type pageModelType, object data, bool modal = false, bool animate = true)
{
    var coreMethods = (PageModelCoreMethods)iCoreMethods;
    await coreMethods.PushPageModel(pageModelType, data, modal, animate);
}

josh-cunningham avatar Dec 24 '19 11:12 josh-cunningham

I'm seeing this same issue. It's as if the NuGet version is out of date... Or the code in master is not the one used to build the NuGet package.

This line: https://github.com/rid00z/FreshMvvm/blob/ef679fa6cf1a9adecfad0ab02c618bda4f254284/src/FreshMvvm/IPageModelCoreMethods.cs#L29

Is not present in the interface I have in my project (NuGet v3.0.0).

UPDATE:

If I reference the implementation directly the method is found:

await ((FreshMvvm.PageModelCoreMethods)CoreMethods).PushPageModel(pageModelType, data);

joanbarros avatar Mar 02 '20 21:03 joanbarros