forked from ddrilling/AsbCloudServer
20 lines
342 B
C#
20 lines
342 B
C#
|
using Mapster;
|
|||
|
using System;
|
|||
|
|
|||
|
namespace AsbCloudWebApi.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;
|
|||
|
}
|
|||
|
}
|