public void ToObjectTest() { var sharpObject = SharpObject.Copy(new { test1 = 1, test2 = "test", test3 = true }); var obj = sharpObject.ToObject <TestObject>(); Assert.AreEqual(obj.Test1, 1); }
public List <SharpObject> GetColumnMapping(string path) { SharpNodeMap result; if (!_mapSets.TryGetValue(path, out result)) { return(new List <SharpObject>()); } return(result.Columns.Select(x => SharpObject.Copy(new { x.FieldName, x.Width, x.Offset, })).ToList()); }
public static SharpObject AsSharpObject(this object obj) { return(SharpObject.Copy(obj).Clone()); }
public SharpObjectPathSet(string path, IEnumerable <object> values) { Path = path; Values = values.Select(x => SharpObject.Copy(x)); }
public SharpObjectPath(string path, object value) { Path = path; Value = SharpObject.Copy(value); }