If you want your app to start differently... then just use a different start interface.
For example, your app could register an interface and startup object like:
This file contains 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 enum SimpleStartType | |
{ | |
DirectLogin, | |
Twitter, | |
Facebook, | |
Instructions, | |
// ... | |
} | |
public interface ISimpleStart | |
{ | |
void Start(SimpleStartType type); | |
} | |
public class SimpleStart : ISimpleStart | |
{ | |
public void Start(SimpleStartType type) | |
{ | |
switch (type) | |
{ | |
case DirectLogin: | |
this.RequestNavigate<DirectLoginViewModel>(); | |
break; | |
// ... | |
} | |
} | |
} | |
// somewhere in App.cs | |
this.RegisterServiceInstance<ISimpleStart>(new SimpleStart()); |
Then each platform could just call GetService for this interface and can choose it's own startup path....
No comments:
Post a Comment