Esempio n. 1
0
        private async Task <bool> RefreshInstitute()
        {
            if (asyncLock)
            {
                return(false);
            }
            try {
                asyncLock     = true;
                instituteInfo = await packetWriter.RefreshInstituteAsync();

                if (instituteInfo == null)
                {
                    return(false);
                }
                var techIds = new List <int>();
                foreach (var tech in instituteInfo.Techs)
                {
                    techIds.Add(tech.Id);
                }
                techList.SetObjects(techIds, true);
                return(true);
            } finally {
                asyncLock = false;
            }
        }