Esempio n. 1
0
        public static Delta SyncReadWrite(List <QueueProcessor> qlist, string clientmachine, string sharename, string token, State clientstate, Delta clientdelta)
        {
            var cs = Global.ConnectionList.Find(x => x.Name == sharename && x.MachineName == clientmachine && x.Token == token);

            if (cs != null)
            {
                var q = qlist.Find(x => x.cs == cs);
                if (q != null)
                {
                    _log.Info("Sync RW : " + sharename);
                    return(DeltaProcessor.SynchronizeSendRecieve(q, cs, clientstate, clientdelta));
                }
                else
                {
                    _log.Debug("Queue for share not found : " + cs);
                    return(new Delta());
                }
            }
            _log.Debug($"{clientmachine}/{sharename} and token not found");
            return(new Delta());
        }