public void SaveValues <T>(string key, T[] values) where T : IConvertible, IComparable
        {
            Type t = typeof(T);

            ThrowExceptionWhenISaveable("It is forbidden use this method to save an `ISaveable`! Use `SaveRefs` instead!", t);
            if (t.IsClass && !t.IsPrimitive && t != typeof(string))
            {
                throw new Exception(string.Format("Can't save list of values under key `{1}` for they are not of a value or primitive type!", values, key));
            }
            SaveStruct(key, SaveableArray.From(values));
        }
 public void SaveStructs <T>(string key, T[] values) where T : struct
 {
     SaveStruct(key, SaveableArray.From(values));
 }
Exemplo n.º 3
0
 private void SetKeysToKeep()
 {
     SetValue(REF_KEYS_TO_KEEP_KEY, SaveableArray.From(_keysToKeep.ToArray()));
 }