Re-fabrication

This commit is contained in:
2018-03-26 19:27:29 +02:00
parent e00bcbe275
commit 8fbe56c67e
499 changed files with 7510 additions and 12466 deletions

View File

@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Attributes.Validation;
namespace Yavsc.Models.IT.Maintaining
{
public class Feature
{
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[YaStringLength(256,MinLen=3)]
public string ShortName { get; set; }
[YaStringLength(10*1024,MinLen=3)]
public string Description { get; set; }
public FeatureStatus Status { get; set; }
}
}

View File

@ -0,0 +1,18 @@
namespace Yavsc.Models.IT.Maintaining
{
/// <summary>
/// A Feature status
/// <c>Ko</c>: A Bug has just been discovered
/// <c>InSane</c>: This feature is not correctly integrating its ecosystem
/// <c>Obsolete</c>: This will be replaced in a short future, or yet has been replaced
/// with a better solution.
/// <c>Ok</c> : nothing to say
/// </summary>
public enum FeatureStatus: int
{
Requested,
Accepted,
Rejected,
Implemented
}
}

View File

@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Attributes.Validation;
using Yavsc.Models.IT.Maintaining;
namespace Yavsc.Models.IT.Fixing
{
public class Bug
{
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[ForeignKey("FeatureId")]
public virtual Feature False { get; set; }
public long? FeatureId { get; set; }
[YaStringLength(2048)]
public string Description { get; set; }
public BugStatus Status { get; set; }
}
}

View File

@ -0,0 +1,17 @@
namespace Yavsc.Models.IT.Fixing
{
/// <summary>
/// Bug status:
/// * Inserted -> Confirmed|FeatureRequest|Feature|Rejected
/// * Confirmed -> Fixed
/// * FeatureRequest -> Implemented
/// </summary>
public enum BugStatus : int
{
Inserted,
Confirmed,
Rejected,
Feature,
Fixed
}
}

View File

@ -0,0 +1,39 @@
using System;
using System.Collections;
using System.Collections.Generic;
namespace Yavsc.Models.IT.Modeling
{
public abstract class Code<TLetter> : ICode<TLetter> where TLetter : ILetter<TLetter>
{
IEnumerator IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
/// <summary>
/// !a Count^3 task len
/// </summary>
/// <returns></returns>
public bool Validate()
{
foreach (var letter in this) {
var word = this.CreateWord(letter);
foreach (var other in this) {
IWord<TLetter> first = word.Aggregate(other);
foreach (var tierce in this)
{
var otherword = word.Aggregate(tierce);
if (first.Equals(otherword))
return false;
}
}
}
return true;
}
public abstract IEnumerator<TLetter> GetEnumerator();
public abstract IWord<TLetter> CreateWord(TLetter letter);
}
}

View File

@ -0,0 +1,14 @@
namespace Yavsc.Models.IT.Modeling
{
public abstract class Letter<T> : ILetter<T>
{
public abstract bool Equals(T x, T y);
public int GetHashCode(T obj)
{
return obj.GetHashCode();
}
}
}