using SteamWare; using System; using System.Collections.Generic; namespace MP_SITE { public partial class test : System.Web.UI.Page { public resoconti _resoconti; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { setupMemHash(); } } public string hashKey { get { return memLayer.ML.redHash("TestMem"); } } private void setupMemHash() { // scrivo 3 valori in redis DI DEFAULT var listMemoria = new List>(); for (int i = 0; i < 5; i++) { listMemoria.Add(new KeyValuePair(string.Format("key_{0}", i), i.ToString())); } // salvo vettori lingua CURR memLayer.ML.redFlushKey(hashKey); memLayer.ML.redSaveHashList(hashKey, listMemoria); } public intervalloDate intervalloAnalisi { get { intervalloDate answ = new intervalloDate() { inizio = Convert.ToDateTime("2018-05-1") , fine = Convert.ToDateTime("2018-05-30") }; return answ; } } protected void lbtSave_Click(object sender, EventArgs e) { // effettua salvataggio HASH solo 1 valore var listMemoria = new List>(); int i = 1; listMemoria.Add(new KeyValuePair(string.Format("key_{0}", i), txtVal.Text)); memLayer.ML.redSaveHashList(hashKey, listMemoria); } } }