コード例 #1
0
        public async Task <IEnumerable <Produto> > Handle(Vitrine message)
        {
            IEnumerable <Produto> produtos = null;

            if (!cache.TryGetValue(ChaveDoCache, out produtos))
            {
                produtos = await repositorioDeProdutos.BuscarVitrine();

                if (produtos?.Any() ?? false)
                {
                    cache.Set(ChaveDoCache, produtos);
                }
            }

            return(produtos);
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: clsaad/freehelpapp
 private void OnGetBannerData(WWW www)
 {
     Vitrine.Init(www);
 }
コード例 #3
0
 public static void Init(WWW www)
 {
     s_instance = new Vitrine(www);
 }