Esempio n. 1
0
 public void Expression_CopyConstructor()
 {
     CopyableBenchmarkObject  obj1 = ExpressionConstructor(ObjectToCopy);
     CopyableBenchmarkObject2 obj2 = ExpressionConstructor2(ObjectToCopy2);
     CopyableBenchmarkObject3 obj3 = ExpressionConstructor3(ObjectToCopy3);
     CopyableBenchmarkObject4 obj4 = ExpressionConstructor4(ObjectToCopy4);
 }
Esempio n. 2
0
 public void Direct_CopyConstructor()
 {
     // ReSharper disable ObjectCreationAsStatement
     var obj1 = new CopyableBenchmarkObject(ObjectToCopy);
     var obj2 = new CopyableBenchmarkObject2(ObjectToCopy2);
     var obj3 = new CopyableBenchmarkObject3(ObjectToCopy3);
     var obj4 = new CopyableBenchmarkObject4(ObjectToCopy4);
     // ReSharper restore ObjectCreationAsStatement
 }
Esempio n. 3
0
 public CopyableBenchmarkObject2([NotNull] CopyableBenchmarkObject2 other)
 {
     Property = other.Property;
 }