Fix PureResolve

This commit is contained in:
h z
2024-06-25 18:50:48 +08:00
parent c02cc4a0c1
commit bd60f4d6a0

View File

@@ -233,4 +233,18 @@ public class Link<TObject> : IEnumerable<TObject>
Remove(res);
return resValue;
}
/// <summary>
/// remove the last item
/// </summary>
/// <returns></returns>
/// <exception cref="Exception"></exception>
public TObject RemoveLast()
{
LinkNode<TObject> res = Last;
if (res.IsEnding)
throw new Exception("TODO");
TObject resValue = res.Value;
Remove(res);
return resValue;
}
}