protected void CopyDicts(RulesetTemplate copyFrom)
 {
     if (copyFrom.Realm.PropertyCountRandomized.HasValue)
     {
         var count = copyFrom.Realm.PropertyCountRandomized.Value;
         var props = TakeRandomProperties(count, copyFrom);
         foreach (var prop in props)
         {
             if (prop is AppliedRealmProperty <bool> a)
             {
                 PropertiesBool.Add((RealmPropertyBool)a.PropertyKey, new AppliedRealmProperty <bool>(a));
             }
             else if (prop is AppliedRealmProperty <int> b)
             {
                 PropertiesInt.Add((RealmPropertyInt)b.PropertyKey, new AppliedRealmProperty <int>(b));
             }
             else if (prop is AppliedRealmProperty <double> c)
             {
                 PropertiesFloat.Add((RealmPropertyFloat)c.PropertyKey, new AppliedRealmProperty <double>(c));
             }
             else if (prop is AppliedRealmProperty <long> d)
             {
                 PropertiesInt64.Add((RealmPropertyInt64)d.PropertyKey, new AppliedRealmProperty <long>(d));
             }
             else if (prop is AppliedRealmProperty <string> e)
             {
                 PropertiesString.Add((RealmPropertyString)e.PropertyKey, new AppliedRealmProperty <string>(e));
             }
         }
     }
     else
     {
         foreach (var item in copyFrom.PropertiesBool)
         {
             PropertiesBool.Add(item.Key, new AppliedRealmProperty <bool>(item.Value));
         }
         foreach (var item in copyFrom.PropertiesFloat)
         {
             PropertiesFloat.Add(item.Key, new AppliedRealmProperty <double>(item.Value));
         }
         foreach (var item in copyFrom.PropertiesInt)
         {
             PropertiesInt.Add(item.Key, new AppliedRealmProperty <int>(item.Value));
         }
         foreach (var item in copyFrom.PropertiesInt64)
         {
             PropertiesInt64.Add(item.Key, new AppliedRealmProperty <long>(item.Value));
         }
         foreach (var item in copyFrom.PropertiesString)
         {
             PropertiesString.Add(item.Key, new AppliedRealmProperty <string>(item.Value));
         }
     }
 }
        public long GetProperty(RealmPropertyInt64 property)
        {
            var att = RealmConverter.PropertyDefinitionsInt64[property];

            if (PropertiesInt64.TryGetValue(property, out var result))
            {
                var val = result.Value;
                val = Math.Max(val, att.MinValue);
                val = Math.Min(val, att.MaxValue);
                return(val);
            }
            return(att.DefaultValue);
        }