예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SimBalanceViewModel" /> class.
        /// </summary>
        /// <param name="simBalance">The sim balance.</param>
        /// <param name="topUpHistory">The top up history.</param>
        /// <param name="usageHistory">The usage history.</param>
        /// <param name="authorizationService">The authorization service.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="resourceLoader">The resource loader.</param>
        /// <exception cref="System.ArgumentNullException"></exception>
        public SimBalanceViewModel(ISimBalance simBalance, ITopUpHistory topUpHistory, IUsageHistory usageHistory, IAuthorizationService authorizationService, INavigationService navigationService, ResourceLoader resourceLoader)
            : base(authorizationService, resourceLoader, navigationService)
        {
            if (simBalance == null)
            {
                throw new ArgumentNullException("simBalance");
            }
            if (topUpHistory == null)
            {
                throw new ArgumentNullException("topUpHistory");
            }
            if (usageHistory == null)
            {
                throw new ArgumentNullException("usageHistory");
            }

            _mobileNumber = (DTO.MobileNumber)NavigationService.Parameter;

            _simBalanceRepository = simBalance;
            _topUpHistory = topUpHistory;
            _usageHistory = usageHistory;

            Groups = new ObservableCollection<Group>();

            HandleNoInternet();
            LoadBalance();

        }
예제 #2
0
 public void Initialize()
 {
     _repository = new UsageHistory();
 }