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
[Register("AppDelegate")] | |
public class AppDelegate : UIApplicationDelegate | |
{ | |
private void LoadDependencies() | |
{ | |
// Load dependencies in methods that run once per run of the application | |
IDependencyService serviceLocator = DependencyService.Instance; | |
if (null == serviceLocator.GetService<ILoginPresenter) |
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 interface ILoginView | |
{ | |
void SetLoadingState(); | |
void SetDelayedState(); | |
void ClearFields(); | |
void ShowFingerPrint(); | |
void ShowPasscode(); | |
void ShowLogin(); | |
} |
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 partial class LoginViewController : UIViewController | |
{ | |
private ILoginPresenter _loginPresenter = null; | |
private IAsyncSubscriber _listenerToken = null; | |
public override void ViewDidLoad() | |
{ | |
base.ViewDidLoad(); | |
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 interface INetworkService | |
{ | |
Task<NetResult<TResult>> GetAsync<TResult>(string uri, string token = ""); | |
Task<NetResult<TResult>> PostAsync<TResult>(string uri, TResult data, string token = "", string header = ""); | |
Task<NetResult<TResult>> PostAsync<TResult>(string uri, string data, string clientId, string clientSecret); | |
Task<NetResult<TResult>> PutAsync<TResult>(string uri, TResult data, string token = "", string header = ""); |
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 ServiceMode | |
{ | |
RECORD, | |
MOCK | |
} | |
public class Request | |
{ | |
public string Uri { get; set; } | |
public string RelativeUri { get; set; } |
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 void RegisterServices() | |
{ | |
var builder = new ContainerBuilder(); | |
#if AUTOMATION | |
builder.RegisterType<MockNetworkService>.As<INetworkService>().SingleInstance(); | |
#else | |
builder.RegisterInstance<NetworkService>.As<INetworkService>().SingleInstance(); | |
#endif | |
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
#if AUTOMATION | |
[Export("LoadApiData")] | |
public void LoadApiData(string jsonData) | |
{ | |
var rp = AppContainer.Instance.Resolve<INetworkService>() as MockNetworkService; | |
rp.LoadApiData(jsonData); | |
} | |
[Export("ReloadApiData")] |
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
[TestFixture(Platform.Android)] | |
[TestFixture(Platform.iOS)] | |
public class ItemListTest : BaseTest | |
{ | |
public ItemListTest(Platform platform) : base(platform) | |
{ } | |
[Test] | |
public void ItemListBasicTest() | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace App.Common.Core.ViewModels |
OlderNewer