public async Task <bool> ImplementProcess()
        {
            if (_data == null || _data.Count() <= 0)
            {
                return(true);
            }
            var tasks = new List <Task <bool> >();

            if (TargetType.Invoke().Equals(typeof(LocalPushUpdating)))
            {
                foreach (var element in _data)
                {
                    tasks.Add(UpdateProcessing.UpdateWhenStatusOfElementChangeToDeletedAsync(element, _repository));
                }
            }
            else
            {
                foreach (var element in _data)
                {
                    tasks.Add(UpdateProcessing.ReGenerateElementBelowLocalAsync(element, _repository));
                }
            }
            await Task.WhenAll(tasks);

            return(true);
        }
Ejemplo n.º 2
0
        public async Task <bool> ImplementNormalLocal()
        {
            if (NormalLocalSet == null || NormalLocalSet.Count() <= 0)
            {
                return(true);
            }
            var tasks = new List <Task <bool> >();

            if (TargetType.Invoke().Equals(typeof(LocalPushUpdating)))
            {
                foreach (var element in NormalLocalSet)
                {
                    tasks.Add(UpdateProcessing.StatusChangeFromPendingDeleteToNormalAsync(element, _repository));
                }
            }
            else
            {
                foreach (var element in NormalLocalSet)
                {
                    tasks.Add(UpdateProcessing.StatusChangeFromPendingDeleteToDeletedAsync(element, _repository));
                }
            }
            await Task.WhenAll(tasks);

            return(true);
        }
Ejemplo n.º 3
0
 public void ImplementNoneLocal()
 {
     if (NoneLocalSet == null || NoneLocalSet.Count() <= 0)
     {
         return;
     }
     if (TargetType.Invoke().Equals(typeof(LocalPushUpdating)))
     {
         foreach (var element in NoneLocalSet)
         {
             UpdateProcessing.CreateElementFromStack(element, _repository, _idDrawing);
         }
     }
 }
 public void ImplementNormalLocal()
 {
     if (NormalLocalSet == null || NormalLocalSet.Count() <= 0)
     {
         return;
     }
     if (TargetType.Invoke().Equals(typeof(LocalPushUpdating)))
     {
         foreach (var element in NormalLocalSet)
         {
             // Tao geometry
             UpdateProcessing.CreateNewGeometryVersion(element, _repository);
         }
     }
 }
Ejemplo n.º 5
0
        public async Task <bool> ImplementDeletedLocal()
        {
            if (DeletedLocalSet == null || DeletedLocalSet.Count() <= 0)
            {
                return(true);
            }
            var tasks = new List <Task <bool> >();

            foreach (var element in DeletedLocalSet)
            {
                tasks.Add(UpdateProcessing.StatusChangeFromPendingDeleteToDeletedAsync(element, _repository));
            }
            await Task.WhenAll(tasks);

            return(true);
        }