Example #1
0
        public static Tuple <StructureValueForClient, string> GetParamatersForClientReady(List <string> ListNameOfValue) // Для запроса по нажатию, получает уже готовый результат
        {
            StructureValueForClient           ReturnStruct = default;
            ProgressOfUpdateAtStructAttribute Progress     = (ProgressOfUpdateAtStructAttribute)ParentMethods.GetStandart().Clone_Full();

            Progress.NonSerializedConfig.IsInTask = false;
            Progress.NonSerializedConfig.Method   = new Action(() =>
            {
                DateTime Start = DateTime.Now;

                try
                {
                    ReturnStruct = AutoRefresh_ServerPart.GetParamatersForClientReady(ListNameOfValue);
                }
                catch (Exception ex)
                {
                    try
                    {
                        ReturnStruct = AutoRefresh_ServerPart.GetParamatersForClientReady(ListNameOfValue);
                    }
                    catch (Exception exx)
                    {
                    }
                }

                TimeSpan TimeSpend = DateTime.Now - Start;
                ReturnStruct.TimeServerOnGetProperties   = TimeSpend;
                ReturnStruct.TimeServerWhenGetProperties = DateTime.Now.TimeOfDay;
            });
            Progress.Start();

            return(new Tuple <StructureValueForClient, string>(ReturnStruct, Progress.ExceptionMessage));
        }
Example #2
0
        public static Tuple <StructureValueForClient, string> CheckAutoRefresh(StructureValueForClient StructureValueForClient)
        {
            StructureValueForClient           Text     = default;
            ProgressOfUpdateAtStructAttribute Progress = (ProgressOfUpdateAtStructAttribute)ParentMethods.GetStandart().Clone_Full();

            Progress.NonSerializedConfig.IsInTask = false;
            Progress.NonSerializedConfig.Method   = new Action(() =>
            {
                Text = AutoRefresh_ServerPart.CheckAutoRefresh(StructureValueForClient);
            });
            Progress.Start();

            return(new Tuple <StructureValueForClient, string>(Text, Progress.ExceptionMessage));
        }