040be2feaa
Convert constructors into primary constructors Simplified logic with use of ??, ??= and method groups Cleaned up redundant conditional access qualifiers
13 lines
343 B
C#
13 lines
343 B
C#
namespace SPTarkov.Server.Core.Utils.Cloners;
|
|
|
|
/// <summary>
|
|
/// Disabled as FastCloner library is 15% faster and consumes less memory than Json serialization
|
|
/// </summary>
|
|
public class JsonCloner(JsonUtil jsonUtil) : ICloner
|
|
{
|
|
public T? Clone<T>(T? obj)
|
|
{
|
|
return jsonUtil.Deserialize<T>(jsonUtil.Serialize(obj));
|
|
}
|
|
}
|