private static AppliedRealmProperty <string> ConvertRealmProperty(RealmPropertiesString dbobj) { var prop = new RealmPropertyOptions <string>(); var att = PropertyDefinitionsString[(RealmPropertyString)dbobj.Type]; prop.SeedPropertiesStatic(dbobj.Value, att.DefaultValue, (byte)RealmPropertyCompositionType.replace, dbobj.Locked, dbobj.Probability); return(new AppliedRealmProperty <string>(dbobj.Type, prop)); }
private static AppliedRealmProperty <double> ConvertRealmProperty(RealmPropertiesFloat dbobj) { var att = PropertyDefinitionsFloat[(RealmPropertyFloat)dbobj.Type]; var prop = new RealmPropertyOptions <double>(); if (dbobj.Value.HasValue) { prop.SeedPropertiesStatic(dbobj.Value.Value, att.DefaultValue, dbobj.CompositionType, dbobj.Locked, dbobj.Probability); } else { prop.SeedPropertiesRandomized(att.DefaultValue, dbobj.CompositionType, dbobj.RandomType, dbobj.RandomLowRange.Value, dbobj.RandomHighRange.Value, dbobj.Locked, dbobj.Probability); } return(new AppliedRealmProperty <double>(dbobj.Type, prop)); }