Ejemplo n.º 1
0
 void IPointCommand.Write(BinaryWriter w)
 {
     w.Write(TakeY);
     w.Write(SkipX);
     w.Write(SkipY);
     PointSerDes.EncodeFunc(w, Group);
     PointSerDes.EncodeFunc(w, Cmds);
 }
Ejemplo n.º 2
0
 void IPointCommand.Read(BinaryReader r)
 {
     TakeY = r.ReadInt32();
     SkipX = r.ReadInt32();
     SkipY = r.ReadInt32();
     Group = PointSerDes.DecodeFunc <IPointContext, IEnumerable <Collection <string> >, IEnumerable <IGrouping <T, Collection <string> > > >(r);
     Cmds  = PointSerDes.DecodeFunc <IPointContext, object, IPointCommand[]>(r);
     _set  = new List <Collection <string> >();
 }
Ejemplo n.º 3
0
 void IPointCommand.Describe(StringWriter w, int pad)
 {
     w.WriteLine($"{new string(' ', pad)}PushFrame:"); PointSerDes.DescribeCommands(w, pad, Cmds);
 }
Ejemplo n.º 4
0
 void IPointCommand.Write(BinaryWriter w) => PointSerDes.EncodeCommands(w, Cmds);
Ejemplo n.º 5
0
 void IPointCommand.Read(BinaryReader r) => Cmds = PointSerDes.DecodeCommands(r);
Ejemplo n.º 6
0
 void IPointCommand.Write(BinaryWriter w)
 {
     PointSerDes.EncodeFunc(w, Func);
     PointSerDes.EncodeCommands(w, Cmds);
 }
Ejemplo n.º 7
0
 void IPointCommand.Read(BinaryReader r)
 {
     Func = PointSerDes.DecodeFunc <IPointContext, Collection <string>, object, CommandRtn>(r);
     Cmds = PointSerDes.DecodeCommands(r);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Decodes the specified packed.
 /// </summary>
 /// <param name="packed">The packed.</param>
 /// <returns></returns>
 public static IPointCommand[] Decode(string packed) => PointSerDes.Decode(packed.Substring(Stream.Length));
Ejemplo n.º 9
0
 /// <summary>
 /// Encodes the specified CMDS.
 /// </summary>
 /// <param name="cmds">The CMDS.</param>
 /// <returns></returns>
 public static string Encode(params IPointCommand[] cmds) => $"{Stream}{PointSerDes.Encode(cmds)}";
Ejemplo n.º 10
0
 /// <summary>
 /// Encodes the specified describe.
 /// </summary>
 /// <param name="describe">if set to <c>true</c> [describe].</param>
 /// <param name="cmds">The CMDS.</param>
 /// <returns></returns>
 public static string Encode(bool describe, params IPointCommand[] cmds) => $"{(describe ? PointSerDes.Describe(Comment, cmds) : null)}{Stream}{PointSerDes.Encode(cmds)}";
Ejemplo n.º 11
0
 void IPointCommand.Write(BinaryWriter w)
 {
     w.Write((byte)When);
     PointSerDes.EncodeAction(w, Action);
 }
Ejemplo n.º 12
0
 void IPointCommand.Read(BinaryReader r)
 {
     When   = (When)r.ReadByte();
     Action = PointSerDes.DecodeAction <IPointContext>(r);
 }
Ejemplo n.º 13
0
 void IPointCommand.Read(BinaryReader r)
 {
     When = (When)r.ReadByte();
     Func = PointSerDes.DecodeFunc <IPointContext, Collection <string>, CommandRtn>(r);
     Cmds = PointSerDes.DecodeCommands(r);
 }