Ejemplo n.º 1
0
 public string Execute(Arguments arg, Stream stream)
 {
     var repository = new RepositoryXML(stream);
     var activities = repository.List();
     foreach(var activity in activities)
     {
         repository.Delete(activity.List()["id"]);
     }
     return "Clear all activities";
 }
Ejemplo n.º 2
0
 private static string StreamList(RepositoryXML text)
 {
     var listContent = new StringBuilder();
     foreach (var activity in text.List())
     {
         foreach (var value in activity.List().Values)
             listContent.Append(value);
     }
     return listContent.ToString();
 }
Ejemplo n.º 3
0
 private static IEnumerable<string> ActivitysField(MemoryStream stream, string field)
 {
     var repository = new RepositoryXML(stream);
     foreach (var activity in repository.List())
     {
         yield return activity.List()[field];
     }
 }