private TestDeepEqualityTester.MooCakesAndStuff StartMeOffJoe() { var moo = new TestDeepEqualityTester.MooCakesAndStuff(); foreach (var propertyInfo in _props) { var match = _moreProps.First(pi => pi.Name == propertyInfo.Name); var myVal = match.GetValue(this); propertyInfo.SetValue(moo, myVal); } return(moo); }
public static MooCakesAndStuffWithEncodedGraphData From(TestDeepEqualityTester.MooCakesAndStuff moo) { var result = new MooCakesAndStuffWithEncodedGraphData(); foreach (var propertyInfo in _props) { var match = _moreProps.First(pi => pi.Name == propertyInfo.Name); var srcVal = match.GetValue(moo); propertyInfo.SetValue(result, srcVal); } result.EnkiEnki = $"data:application/json;base64,{Convert.ToBase64String(JsonConvert.SerializeObject(moo.WubWubs).AsBytes())}"; return(result); }