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); }
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); } }
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); }