Skip to content

Instantly share code, notes, and snippets.

@alexshikov
Last active April 6, 2016 17:07
Show Gist options
  • Save alexshikov/fb8cf3da04c229e0f18faa4476731aa5 to your computer and use it in GitHub Desktop.
Save alexshikov/fb8cf3da04c229e0f18faa4476731aa5 to your computer and use it in GitHub Desktop.
Custom plugin loading
public class Setup : MvxAndroidSetup
{
// ...
protected override IMvxPluginManager CreatePluginManager()
{
return new MyPluginManager(".Droid", ".dll");
}
private class MyPluginManager: MvxFilePluginManager
{
public MyPluginManager (string v1, string v2): base (v1, v2)
{}
protected override string GetPluginAssemblyNameFrom(Type toLoad, string platformDllPostfix)
{
if (toLoad == typeof (MvvmCross.Plugins.Location.PluginLoader))
{
return typeof(MvvmCross.Plugins.Location.Fused.Droid.Plugin).Assembly.FullName;
}
return base.GetPluginAssemblyNameFrom(toLoad, platformDllPostfix);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment