接入obfuz->2.0

This commit is contained in:
Alex-Rachel
2025-07-26 08:10:41 +08:00
parent f2c7ff4336
commit cb86d8868e
713 changed files with 57092 additions and 10 deletions

View File

@@ -0,0 +1,47 @@
using System.Collections.Generic;
using System.Diagnostics;
namespace Obfuz
{
public class Pipeline
{
private readonly List<IObfuscationPass> _passes = new List<IObfuscationPass>();
public bool Empty => _passes.Count == 0;
public Pipeline AddPass(IObfuscationPass pass)
{
_passes.Add(pass);
return this;
}
public void Start()
{
foreach (var pass in _passes)
{
pass.Start();
}
}
public void Stop()
{
foreach (var pass in _passes)
{
pass.Stop();
}
}
public void Run()
{
var sw = new Stopwatch();
foreach (var pass in _passes)
{
sw.Restart();
pass.Process();
sw.Stop();
UnityEngine.Debug.Log($"Pass: {pass.GetType().Name} process cost time: {sw.ElapsedMilliseconds}ms");
}
}
}
}