Beispiel #1
0
 public Pipe(IReadableStream source, IWritableStream target, object transformFunction, Action <Pipe> breakFunction)
 {
     Source             = source;
     Target             = target;
     TransformFunction  = transformFunction;
     this.breakFunction = breakFunction;
 }
Beispiel #2
0
        public void WriteTable(IWritableStream s, EntityDef e, TableVal v)
        {
            var Writer = GetRowWriter(e);
            var NumRow = v.Rows.Count;

            s.WriteInt32(NumRow);
            for (int k = 0; k < NumRow; k += 1)
            {
                Writer(s, v.Rows[k]);
            }
        }
Beispiel #3
0
        public void Write(IWritableStream s, RelationVal v)
        {
            int k = 0;

            foreach (var e in Schema.Types.Where(t => t.OnEntity).Select(t => t.Entity))
            {
                WriteTable(s, e, v.Tables[k]);
                k += 1;
            }
            if (k != v.Tables.Count)
            {
                throw new InvalidOperationException();
            }
        }
 public TimerController(IWritableStream errorStream)
 {
     this.errorStream = errorStream;
 }