public Action OneRun() { var source = new SomeClass { field = 42, Property = new SomeClass2 { Property = new SomeClass3 { field = new int[1240] } } }; var replicator = new ObjectReplicator(new ConventionalMetadataProvider()); replicator.Replicate("12"); return () => replicator.Replicate(source); }
public Action ReplicatorClone() { SomeClass source = CreateData(); var replicator = new ObjectReplicator(new ConventionalMetadataProvider()); replicator.Replicate(new SomeClass()); replicator.Replicate(new SomeClass2()); return () => { source = replicator.Replicate(source); Consume(source); }; }
public Action ManyRuns() { var source = new SomeClass { field = 42, Property = new SomeClass2 { Property = new SomeClass3 { field = new int[1240] } } }; var replicator = new ObjectReplicator(new ConventionalMetadataProvider()); return () => { for (int i = 0; i < iterationCount; ++i) source = replicator.Replicate(source); }; }
public static T ObjectIgnoringConventions <T>(T source) { return(unconventionalReplicator.Replicate(source)); }
public static T ObjectGraph <T>(T source) { return(conventionalReplicator.Replicate(source)); }