示例#1
0
 public void Expression_CopyConstructor()
 {
     CopyableBenchmarkObject  obj1 = ExpressionConstructor(ObjectToCopy);
     CopyableBenchmarkObject2 obj2 = ExpressionConstructor2(ObjectToCopy2);
     CopyableBenchmarkObject3 obj3 = ExpressionConstructor3(ObjectToCopy3);
     CopyableBenchmarkObject4 obj4 = ExpressionConstructor4(ObjectToCopy4);
 }
示例#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
 }
示例#3
0
 public CopyableBenchmarkObject4([NotNull] CopyableBenchmarkObject4 other)
 {
     Property = other.Property;
 }