Exemple #1
0
 private static Exception GetExceptionFromConstructor(string json, out IntEntry result)
 {
     try {
         result = new IntEntry(JToken.Parse(json));
     } catch (Exception e) {
         result = null;
         return(e);
     }
     // Constructor succeeded
     return(null);
 }
Exemple #2
0
 public void SetInt(string key, long value)
 {
     if (!entries.ContainsKey(key))
     {
         entries.Add(key, new IntEntry(key, value));
     }
     else
     {
         entries[key] = new IntEntry(key, value);
     }
 }
Exemple #3
0
 private static Exception GetExceptionFromConstructor(string id, int value, out IntEntry result)
 {
     try {
         result = new IntEntry(id, value);
     } catch (Exception e) {
         result = null;
         return(e);
     }
     // Constructor succeeded
     return(null);
 }