Last active
April 6, 2016 17:07
-
-
Save alexshikov/fb8cf3da04c229e0f18faa4476731aa5 to your computer and use it in GitHub Desktop.
Custom plugin loading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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