public object Clone() { CloneableObject result = new CloneableObject(); result.Value = Value; return(result); }
public void CloneParametersCopiesValues() { CloneableObject obj = new CloneableObject(); obj.Value = new object(); CloneParameter cloneParam = new CloneParameter(new ValueParameter<CloneableObject>(obj)); CloneableObject result = (CloneableObject) cloneParam.GetValue(null); Assert.AreSame(obj.Value, result.Value); Assert.AreSame(typeof (CloneableObject), cloneParam.GetParameterType(null)); }
public void CloneParametersCopiesValues() { CloneableObject obj = new CloneableObject(); obj.Value = new object(); CloneParameter cloneParam = new CloneParameter(new ValueParameter <CloneableObject>(obj)); CloneableObject result = (CloneableObject)cloneParam.GetValue(null); Assert.AreSame(obj.Value, result.Value); Assert.AreSame(typeof(CloneableObject), cloneParam.GetParameterType(null)); }
public object Clone() { CloneableObject result = new CloneableObject(); result.Value = Value; return result; }