internal Materials()
        {
            ApiService.SubscribeOnce("api_port/port", delegate
            {
                DayDifference   = new MaterialsDifference(this, MaterialsDifferenceType.Day);
                WeekDifference  = new MaterialsDifference(this, MaterialsDifferenceType.Week);
                MonthDifference = new MaterialsDifference(this, MaterialsDifferenceType.Month);

                UpdateCore();

                Observable.Timer(new DateTimeOffset(DateTime.Now.Date.AddDays(1.0)), TimeSpan.FromDays(1.0)).Subscribe(delegate
                {
                    DayDifference.Reload();
                    WeekDifference.Reload();
                    MonthDifference.Reload();

                    UpdateCore();
                });
            });
        }
        internal Materials()
        {
            SessionService.Instance.SubscribeOnce("api_port/port", delegate
            {
                DayDifference = new MaterialsDifference(this, MaterialsDifferenceType.Day);
                WeekDifference = new MaterialsDifference(this, MaterialsDifferenceType.Week);
                MonthDifference = new MaterialsDifference(this, MaterialsDifferenceType.Month);

                UpdateCore();

                Observable.Timer(new DateTimeOffset(DateTime.Now.Date.AddDays(1.0)), TimeSpan.FromDays(1.0)).Subscribe(delegate
                {
                    DayDifference.Reload();
                    WeekDifference.Reload();
                    MonthDifference.Reload();

                    OnPropertyChanged(nameof(DayDifference));
                    OnPropertyChanged(nameof(WeekDifference));
                    OnPropertyChanged(nameof(MonthDifference));
                });
            });
        }
        internal Materials()
        {
            ApiService.SubscribeOnce("api_port/port", delegate
            {
                DayDifference = new MaterialsDifference(this, MaterialsDifferenceType.Day);
                WeekDifference = new MaterialsDifference(this, MaterialsDifferenceType.Week);
                MonthDifference = new MaterialsDifference(this, MaterialsDifferenceType.Month);

                UpdateCore();

                Observable.Timer(new DateTimeOffset(DateTime.Now.Date.AddDays(1.0)), TimeSpan.FromDays(1.0)).Subscribe(delegate
                {
                    DayDifference.Reload();
                    WeekDifference.Reload();
                    MonthDifference.Reload();

                    UpdateCore();
                });
            });
        }