Exemplo n.º 1
0
 public string?GetGovernment(Date date)
 {
     if (InternalHistory.GetFieldValue("government", date) is string govStr)
     {
         return(govStr);
     }
     return(null);
 }
Exemplo n.º 2
0
 public string?GetLiege(Date date)
 {
     if (InternalHistory.GetFieldValue("liege", date) is string liegeStr)
     {
         return(liegeStr);
     }
     return(null);
 }
Exemplo n.º 3
0
    public int?GetDevelopmentLevel(Date date)
    {
        var historyValue = InternalHistory.GetFieldValue("development_level", date);

        return(historyValue switch {
            string devStr when int.TryParse(devStr, out int dev) => dev,
            int devInt => devInt,
            _ => null
        });
Exemplo n.º 4
0
    public string GetHolderId(Date date)
    {
        var idFromHistory = InternalHistory.GetFieldValue("holder", date);

        if (idFromHistory is not null)
        {
            return(idFromHistory.ToString() !);
        }
        return("0");
    }