Beispiel #1
0
 public static IEnumerable <DataAttribute> create_memento
     (time.ClockTime clock_time)
 {
     return(new DataAttribute[] {
         DataAttribute.create_value("seconds_from_midnight", clock_time.seconds_from_midnight.ToString())
     });
 }
Beispiel #2
0
 public static IEnumerable <DataAttribute> create_memento
     (domain.Day day)
 {
     return(new DataAttribute[] {
         DataAttribute.create_value("summary", day.summary),
         DataAttribute.create_collection("date", time.serialisation.Date.create_attribute_memento(day.date)),
         DataAttribute.create_collection("diary", day.diary.Select((de, i) => DataAttribute.create_collection(i.ToString(), DiaryEntry.create_memento(de))))
     });
 }
Beispiel #3
0
 // Q. Why do return types not count as part of a method signatiure?
 public static IEnumerable <DataAttribute> create_attribute_memento
     (time.Date date)
 {
     return(new[] {
         DataAttribute.create_value("year", date.year.ToString())
         , DataAttribute.create_value("month", date.month.ToString())
         , DataAttribute.create_value("day", date.day.ToString())
     });
 }