public Sojo(string id, string name, SojoType contentType, string content) { this.id = id; this.name = name; this.contentType = contentType; this.content = content; }
// 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); }
public List <Sojo> GetAllSojosOfType(SojoType type) { return(database.GetAllSojosOfType(type)); }