refacts and PostIt Nav

This commit is contained in:
Paul Schneider 2026-06-11 00:14:51 +01:00
commit e98bba4247
34 changed files with 315 additions and 200 deletions

View file

@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace Yavsc.Abstract.IT {
@ -10,7 +10,7 @@ public class CiBuildSettings
/// The global process environment variables
/// </summary>
/// <value></value>
[JsonProperty("env")]
[JsonPropertyName("env")]
public string[] Environment { get; set; }
/// <summary>
@ -18,7 +18,7 @@ public class CiBuildSettings
/// </summary>
/// <value></value>
[Required]
[JsonPropertyAttribute("build")]
[JsonPropertyName("build")]
public CommandPipe Build { get; set; }
/// <summary>
@ -27,7 +27,7 @@ public class CiBuildSettings
/// must end ok in order to launch the build.
/// </summary>
/// <value></value>
[JsonPropertyAttribute("prepare")]
[JsonPropertyName("prepare")]
public CommandPipe Prepare { get; set; }
/// <summary>
@ -37,14 +37,14 @@ public class CiBuildSettings
/// only fired on successful build.
/// </summary>
/// <value></value>
[JsonPropertyAttribute("post_build")]
[JsonPropertyName("post_build")]
public CommandPipe PostBuild { get; set; }
/// <summary>
/// Additional emails, as dest of notifications
/// </summary>
/// <value></value>
[JsonPropertyAttribute("emails")]
[JsonPropertyName("emails")]
public string[] Emails { get; set; }
}

View file

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace Yavsc.Abstract.IT
{
@ -13,17 +13,17 @@ namespace Yavsc.Abstract.IT
public class Command
{
[Required]
[JsonPropertyAttribute("path")]
[JsonPropertyName("path")]
public string Path { get; set; }
[JsonPropertyAttribute("args")]
[JsonPropertyName("args")]
public string[] Args { get; set; }
/// <summary>
/// Specific variables for this process
/// </summary>
/// <value></value>
[JsonPropertyAttribute("env")]
[JsonPropertyName("env")]
public string[] Environment { get; set; }
public virtual Process Start(string workingDir=null, bool redirectInput=false, bool redirectOutput=false)

View file

@ -1,8 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
namespace Yavsc.Abstract.IT
{
@ -10,11 +8,11 @@ namespace Yavsc.Abstract.IT
{
[JsonPropertyAttribute("pipe")]
[JsonPropertyName("pipe")]
public Command[] Pipe { get; set; }
[JsonPropertyAttribute("working_dir")]
[JsonPropertyName("working_dir")]
public string WorkingDir { get; set; }
public virtual int Run()

View file

@ -20,7 +20,7 @@ namespace Yavsc.Models.IT.Fixing
ErrorMessageResourceName="TitleSizeError")]
public string Title { get; set; }
[YaStringLength(10240,
[StringLength(10240,
ErrorMessageResourceType=typeof(Yavsc.Models.IT.Fixing.Bug),
ErrorMessageResourceName="DescSizeError")]
public string Description { get; set; }