forked from ddrilling/AsbCloudServer
20 lines
347 B
C#
20 lines
347 B
C#
using Mapster;
|
|
using System;
|
|
|
|
namespace AsbCloudInfrastructure.Tests;
|
|
|
|
public static class CommonExtensions
|
|
{
|
|
public static T Copy<T>(this T obj)
|
|
{
|
|
var copy = obj.Adapt<T>();
|
|
return copy;
|
|
}
|
|
|
|
public static T Mutate<T>(this T obj, Action<T> mutation)
|
|
{
|
|
var copy = obj.Copy();
|
|
return copy;
|
|
}
|
|
}
|