Add calculators cloning logic

This commit is contained in:
Evgeny Redikultsev
2024-12-07 20:50:21 +05:00
parent ccaf9a927c
commit 0538c6b53c
18 changed files with 776 additions and 109 deletions

View File

@@ -6,8 +6,18 @@ using System.Threading.Tasks;
namespace StructureHelperCommon.Infrastructures.Interfaces
{
/// <summary>
/// Interface for cloning objects
/// </summary>
public interface ICloningStrategy
{
/// <summary>
/// Returns copy of object
/// </summary>
/// <typeparam name="T">Type of object</typeparam>
/// <param name="original">Source object</param>
/// <param name="cloneStrategy">Strategy for cloning of object of specified type</param>
/// <returns></returns>
T Clone<T>(T original, ICloneStrategy<T>? cloneStrategy = null) where T : class;
}
}