Пример #1
0
        public SyncCookieRun AddCookieRun(byte[] binCookie, ReplicationCursorCollection replInfo)
        {
            SyncCookieRun ret = SerializeCookieRun(binCookie, replInfo);

            if (ret != null)
            {
                CookieRuns.Add(ret.CookieName, ret);
            }

            return(ret);
        }
Пример #2
0
        private void LoadCookieRuns()
        {
            Dictionary <string, SyncCookieRun> temp = new Dictionary <string, SyncCookieRun>(StringComparer.InvariantCultureIgnoreCase);

            foreach (KeyValuePair <string, string> cookierun in SubFolders)
            {
                temp.Add(cookierun.Key, new SyncCookieRun(cookierun.Key, cookierun.Value));
            }

            foreach (KeyValuePair <string, SyncCookieRun> kvpcookie in temp.OrderBy(c => c.Value.CookieDate))
            {
                CookieRuns.Add(kvpcookie.Key, kvpcookie.Value);
            }
        }
Пример #3
0
        private SyncCookieRun SerializeCookieRun(byte[] binCookie, ReplicationCursorCollection replInfo)
        {
            SyncCookieRun ret = null;

            string crname = Guid.NewGuid().ToString();

            string crpath = Path.Combine(RunPath, crname);

            Directory.CreateDirectory(crpath);

            ret = new SyncCookieRun(crname, crpath, binCookie, replInfo);

            CookieRuns.Add(crname, ret);

            return(ret);
        }