Example #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");
 }
        public static IEnumerable <Profile> GetProfile(this IProfileApi api)
        {
            var result = api.GetProfile();

            foreach (var profile in result.Result.Profile)
            {
                yield return(profile);
            }
        }
Example #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");
        }
Example #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);
        }