Init Scripts in new repo
This commit is contained in:
9
Helpers/ActivatorCache.cs
Normal file
9
Helpers/ActivatorCache.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace SjkScripts.Helpers
|
||||
{
|
||||
public static class ActivatorCache<T> where T : new()
|
||||
{
|
||||
public static readonly Func<T> Create = Expression.Lambda<Func<T>>(Expression.New(typeof(T))).Compile();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user