public async Task CopyDataWithNonPreparedReflection (List <PersonalAddress> personalAddresses, List <OfficeAddress> officeAddresses, List <PersonalPhoneSet> personalPhones, List <OfficePhoneSet> officePhones) { await Task.Run(() => { for (int i = 0; i < personalAddresses.Count; i++) { NarcissusCopier <PersonalAddress, OfficeAddress> .CopyAnyObject(personalAddresses[i], officeAddresses[i]); NarcissusCopier <PersonalPhoneSet, OfficePhoneSet> .CopyAnyObject(personalPhones[i], officePhones[i]); } }); }
public async Task CopyAddressesWithPreparedReflection (List <PersonalAddress> personalAddresses, List <OfficeAddress> officeAddresses, List <PersonalPhoneSet> personalPhones, List <OfficePhoneSet> officePhones) { await Task.Run(() => { NarcissusCopier <PersonalAddress, OfficeAddress> .RegisterTwoObjectCommonProperties(); NarcissusCopier <PersonalPhoneSet, OfficePhoneSet> .RegisterTwoObjectCommonProperties(); for (int i = 0; i < personalAddresses.Count; i++) { NarcissusCopier <PersonalAddress, OfficeAddress> .CopyRegisteredObject(personalAddresses[i], officeAddresses[i]); NarcissusCopier <PersonalPhoneSet, OfficePhoneSet> .CopyRegisteredObject(personalPhones[i], officePhones[i]); } }); }