Ejemplo n.º 1
0
 public MainPage(ServiceContainer container) : base(container)
 {
     InitializeComponent();
     profileApi        = Container.Get <IProfileApi>("api/profile");
     authController    = Container.Get <AuthController>("auth");
     historyController = Container.Get <HistoryController>("history");
 }
Ejemplo n.º 2
0
        public static IEnumerable <Profile> GetProfile(this IProfileApi api)
        {
            var result = api.GetProfile();

            foreach (var profile in result.Result.Profile)
            {
                yield return(profile);
            }
        }
Ejemplo n.º 3
0
        public RegistrationPage(ServiceContainer container) : base(container)
        {
            InitializeComponent();

            viewModel      = new LoginViewModel();
            BindingContext = viewModel;

            userApi        = Container.Get <IUserApi>("api/user");
            profileApi     = Container.Get <IProfileApi>("api/profile");
            authController = Container.Get <AuthController>("auth");
        }
Ejemplo n.º 4
0
        public ProfileEditPage(ServiceContainer container, string profileId) : base(container)
        {
            structureController = Container.Get <StructureController>("structure");
            profileApi          = Container.Get <IProfileApi>("api/profile");
            imageApi            = Container.Get <ImageApi>("api/image");

            InitializeComponent();

            viewModel      = new ProfileEditViewModel();
            BindingContext = viewModel;

            cts = new CancellationTokenSource();
            profileApi.Get(profileId).Subscribe(SetModel, cts.Token);
        }