Ejemplo n.º 1
0
        public UpdateIpDetails InitiateUpdateInformation()
        {
            /// Get all the ips from DB for the update
            HashSet <string> ips = _ctx.IPDetails.Select(x => x.Ip).ToHashSet();

            /// Create the object that will be stored in memory and keep the
            /// progress status
            UpdateIpDetails update = CreateObjectForUpdate(ips);

            /// Load the object to the memory
            bool clearOfOtherProcess = _memory.LoadIpsToMemory(update);

            if (!clearOfOtherProcess)
            {
                //  return "Another process is running! Please try again later.";
            }

            return(update);
        }