feat(engine): refactor resource mgmt & render pipeline
Refactors engine infrastructure for improved resource/service management and render pipeline extensibility. Replaces World’s resource API with a service-based API. Splits IGraphicsEngine’s RenderFrame into BeginFrame/EndFrame. Adds support for pluggable render pipelines in RenderSystem. Replaces disposed checks with Debug.Assert in performance paths. Updates RenderExtractionSystem and render loop for new APIs. Improves diagnostics and code clarity. BREAKING CHANGE: Resource API replaced with service API; render pipeline and frame lifecycle interfaces changed.
This commit is contained in:
@@ -390,6 +390,16 @@ public static class ResultExtensions
|
||||
return result;
|
||||
}
|
||||
|
||||
public static Result Then(this Result result, Func<Result> func)
|
||||
{
|
||||
if (result.IsFailure)
|
||||
{
|
||||
return Result.Failure(result.Message);
|
||||
}
|
||||
|
||||
return func();
|
||||
}
|
||||
|
||||
public static Result<U> Then<T, U>(this Result<T> result, Func<T, Result<U>> func)
|
||||
{
|
||||
if (result.IsFailure)
|
||||
|
||||
Reference in New Issue
Block a user