Phase 06 complete: - Namespace renamed in 62 .cs files (namespace + using directives) - AssemblyName + RootNamespace updated in csproj files - FanucProgramManager.csproj → NcProgramManager.csproj - FanucProgramManager.sln → NcProgramManager.sln - FanucProgramManager.Tests/ → NcProgramManager.Tests/ - FANUCMachine.cs deleted (dead code, zero references) Fanuc-prefixed class names kept (FanucMachine, FanucProgram, IFanucMachine) — manufacturer identifiers, not project names. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
979 B
C#
32 lines
979 B
C#
using System.Collections.Generic;
|
|
|
|
namespace NcProgramManager.Cnc.Models
|
|
{
|
|
public sealed class ValidationResult
|
|
{
|
|
public bool Success { get; }
|
|
public IReadOnlyList<ValidationError> Errors { get; }
|
|
|
|
private ValidationResult(bool success, IReadOnlyList<ValidationError> errors)
|
|
{
|
|
Success = success;
|
|
Errors = errors ?? new ValidationError[0];
|
|
}
|
|
|
|
public static ValidationResult Ok()
|
|
{
|
|
return new ValidationResult(true, new ValidationError[0]);
|
|
}
|
|
|
|
public static ValidationResult Fail(IReadOnlyList<ValidationError> errors)
|
|
{
|
|
return new ValidationResult(false, errors);
|
|
}
|
|
|
|
/// <summary>Success result that still carries warning-level entries.</summary>
|
|
public static ValidationResult OkWithWarnings(IReadOnlyList<ValidationError> warnings)
|
|
{
|
|
return new ValidationResult(true, warnings);
|
|
}
|
|
}
|
|
}
|