Peter Kurfer
d8d307545f
- Added Benchmarks - Added Nuke build - Refactored directory structure - Generated GitHub Actions config from Nuke - Added tool to handle benchmarking from Nuke
26 lines
No EOL
608 B
C#
26 lines
No EOL
608 B
C#
using System;
|
|
using Tand.Core.Api;
|
|
using Tand.Core.Models;
|
|
|
|
namespace Tand.Core.Tests
|
|
{
|
|
public class LogTarget<T> : ITandTarget<T>
|
|
{
|
|
private readonly Action<T> _instanceHandle;
|
|
|
|
public LogTarget(Action<T> instanceHandle)
|
|
{
|
|
_instanceHandle = instanceHandle;
|
|
}
|
|
|
|
public void OnEnterMethod(CallEnterContext<T> enterContext)
|
|
{
|
|
_instanceHandle(enterContext.Instance);
|
|
}
|
|
|
|
public void OnLeaveMethod(CallLeaveContext<T> callLeaveContext)
|
|
{
|
|
_instanceHandle(callLeaveContext.Instance);
|
|
}
|
|
}
|
|
} |