mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2026-08-15 02:57:49 +04:00
msh viewport initial
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
namespace NResUI.Rendering.Viewport.Msh;
|
||||
|
||||
public sealed class MshViewportLoadResult
|
||||
{
|
||||
public bool IsSuccess { get; }
|
||||
public string? Error { get; }
|
||||
public string? SourcePath { get; }
|
||||
public IReadOnlyList<ViewportPiece> Pieces { get; }
|
||||
|
||||
private MshViewportLoadResult(
|
||||
bool isSuccess,
|
||||
string? error,
|
||||
string? sourcePath,
|
||||
IReadOnlyList<ViewportPiece> pieces)
|
||||
{
|
||||
IsSuccess = isSuccess;
|
||||
Error = error;
|
||||
SourcePath = sourcePath;
|
||||
Pieces = pieces;
|
||||
}
|
||||
|
||||
public static MshViewportLoadResult Success(string sourcePath, IReadOnlyList<ViewportPiece> pieces)
|
||||
{
|
||||
return new MshViewportLoadResult(true, null, sourcePath, pieces);
|
||||
}
|
||||
|
||||
public static MshViewportLoadResult Failure(string error, string? sourcePath = null)
|
||||
{
|
||||
return new MshViewportLoadResult(false, error, sourcePath, Array.Empty<ViewportPiece>());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user