Пример #1
0
        public List <ACTFKeyss> ACTFKeyssList()
        {
            Settings settings = new Settings();
            var      data     = new List <ACTFKeyss>();

            client = new FireSharp.FirebaseClient(config);
            if (client != null)
            {
                FirebaseResponse response = client.Get("ACTFKeys");
                var json = response.Body;
                if (json != null && json != "null")
                {
                    var Jsondata = JObject.Parse(json);
                    foreach (KeyValuePair <string, JToken> property in Jsondata)
                    {
                        ACTFKeyss CTFKeyssList = JsonConvert.DeserializeObject <ACTFKeyss>(property.Value.ToString());

                        ACTFKeyss ACTFKeyssList_ = new ACTFKeyss();
                        ACTFKeyssList_.id           = CTFKeyssList.id;
                        ACTFKeyssList_.KeyApi       = CTFKeyssList.KeyApi;
                        ACTFKeyssList_.CreationDate = CTFKeyssList.CreationDate;

                        data.Add(ACTFKeyssList_);
                    }
                }
            }

            return(data);
        }
Пример #2
0
 public void ACTFKeysSave(ACTFKeyss aCTFKeyss)
 {
     client = new FireSharp.FirebaseClient(config);
     if (client != null)
     {
         SetResponse resp = client.Set("ACTFKeys/" + aCTFKeyss.id, aCTFKeyss);
     }
 }
Пример #3
0
 public void ACTFKeysDelete(ACTFKeyss aCTFKeyss)
 {
     client = new FireSharp.FirebaseClient(config);
     if (client != null)
     {
         string path = "ACTFKeys/" + aCTFKeyss.id.ToString();
         client.Delete(path);
     }
 }