示例#1
0
 public void FetchInitialDRs()
 {
     foreach (string lang in DRLanguages)
     {
         DRFetcher drFetcher = new DRFetcher(this, lang, OnReceivedDRs);
         drFetcher.BeginFetching();
     }
 }
示例#2
0
    public void FetchDROfDate(string lang, string fetchDate, Action <DailyReflection> callback)
    {
        DailyReflection dr = GetDROfDate(lang, fetchDate);

        if (dr != null)
        {
            if (callback != null)
            {
                callback(dr);
            }
        }
        else
        {
            DRFetcher drFetcher = new DRFetcher(this, lang, OnReceivedDROfDate);
            drFetcher.InitContext((object)callback);
            drFetcher.FetchFromServer(fetchDate);
        }
    }