public object Clone() { var clone = new OhlcSymbol(Bars.Clone() as IBars); ObjectCopy.CopyProperties(this, clone); return(clone); }
public void CopyPropertiesTest() { var firstObject = new TestClass(12.1) { FirstProperty = "Test", SecondProperty = 2 }; var secondObject = new TestClass(24.2); ObjectCopy.CopyProperties(firstObject, secondObject); Assert.AreEqual(firstObject.FirstProperty, secondObject.FirstProperty); Assert.AreEqual(firstObject.SecondProperty, secondObject.SecondProperty); Assert.AreNotEqual(firstObject.ThirdProperty, secondObject.ThirdProperty); }