Ejemplo n.º 1
0
 public static AWSService SharedInstance()
 {
     if (instance == null)
     {
         instance = new AWSService();
     }
     return(instance);
 }
Ejemplo n.º 2
0
        public async Task PostLogs(List <DotLog> dotLogs, List <Position> positionLogs)
        {
            List <Object> messages = new List <Object>(dotLogs.Count() + positionLogs.Count());

            foreach (DotLog d in dotLogs)
            {
                DotLogMinified dm = new DotLogMinified(d);
                WorkerMessage  wm = new WorkerMessage("baseLog", dm);

                messages.Add(wm);
            }

            foreach (Position p in positionLogs)
            {
                PositionMinified pm = new PositionMinified(p);
                WorkerMessage    wm = new WorkerMessage("positionLog", pm);

                messages.Add(wm);
            }

            await AWSService.SharedInstance().SendBatchMessagesAsync(messages);

            StopSelf();
        }