コード例 #1
0
        public void Post(string id)
        {
            Card cards = JsonConvert.DeserializeObject <Card>(id);
            var  board = _cache.Get <Board>("currentState");

            BoardManager.SetCardToNewLane(board, cards.ID, cards.CardProgress);

            _cache.Set("currentState", board, TimeSpan.FromDays(1));
            var           serlizedList = JsonConvert.SerializeObject(board.AllCards);
            string        allText      = System.IO.File.ReadAllText("configuration.json");
            EncriptionKey key          = JsonConvert.DeserializeObject <EncriptionKey>(allText);
            var           filekey      = Encription.GetEncriptedFile(key);

            filekey.Description = serlizedList;
            Encription.EncriptedFile(filekey);
            Encription.SaveDataSet(filekey);
        }
コード例 #2
0
        public void Put(string id)
        {
            // Card cards = value;
            Card cards = JsonConvert.DeserializeObject <Card>(id);

            cards.CardProgress = LaneType.Backlog;
            cards.Date         = DateTime.Now.ToShortDateString();
            var board = _cache.Get <Board>("currentState");

            cards.ID     = board.LastID + 1;
            board.LastID = cards.ID;
            BoardManager.AddCardToBoard(board, cards);

            _cache.Set("currentState", board, TimeSpan.FromDays(1));
            var           serlizedList = JsonConvert.SerializeObject(board.AllCards);
            string        allText      = System.IO.File.ReadAllText("configuration.json");
            EncriptionKey key          = JsonConvert.DeserializeObject <EncriptionKey>(allText);
            var           filekey      = Encription.GetEncriptedFile(key);

            filekey.Description = serlizedList;
            Encription.EncriptedFile(filekey);
            Encription.SaveDataSet(filekey);
        }