Exemplo n.º 1
0
 public Sojo(string id, string name, SojoType contentType, string content)
 {
     this.id          = id;
     this.name        = name;
     this.contentType = contentType;
     this.content     = content;
 }
Exemplo n.º 2
0
    // Returns a list of Sojo's of the given type. This is a linear-time operation that shouldn't
    // be called too often. Maybe once when populating a list is OK, but don't call every frame.
    public List <Sojo> GetAllSojosOfType(SojoType type)
    {
        List <Sojo> sojos = new List <Sojo>();

        foreach (Sojo sojo in sojosById.Values)
        {
            if (sojo.contentType == type)
            {
                sojos.Add(sojo);
            }
        }
        return(sojos);
    }
Exemplo n.º 3
0
 public List <Sojo> GetAllSojosOfType(SojoType type)
 {
     return(database.GetAllSojosOfType(type));
 }