Files
Prime Build 1540aeb7be Polish Windows 11 tweaks and add one-click updates (#40)
Verify persisted Windows tweak state on startup, modernize selection styling, and make in-app updates check every launch, install automatically after consent, preserve settings, and relaunch ThreadPilot.
2026-08-01 13:50:11 +02:00

37 lines
826 B
C#

namespace ThreadPilot.Models.Core
{
using System;
using System.ComponentModel;
public interface IModel : INotifyPropertyChanged
{
string Id { get; }
DateTime CreatedAt { get; }
DateTime UpdatedAt { get; }
ValidationResult Validate();
IModel Clone();
}
public class ValidationResult
{
public bool IsValid { get; }
public string[] Errors { get; }
public ValidationResult(bool isValid, params string[] errors)
{
this.IsValid = isValid;
this.Errors = errors ?? Array.Empty<string>();
}
public static ValidationResult Success() => new(true);
public static ValidationResult Failure(params string[] errors) => new(false, errors);
}
}