view datagear/command/CommandBuilder.cs @ 16:7352793b5dbe

add some Commands
author riono <e165729@ie.u-ryukyu.ac.jp>
date Sun, 22 Nov 2020 01:52:22 +0900
parents 277dd59bf1e2
children 4a3115ba746d
line wrap: on
line source

using System;
using Christie_net.codegear;
using Christie_net.daemon;
using Christie_net.datagear.dg;

namespace Christie_net.datagear.command {
public class CommandBuilder {
    private CommandType _type;
    protected internal CommandTypeEtx type;
    protected internal string key = null;
    protected internal string toDgmName = null; // for take
    protected internal string fromDgmname = "local"; // for remotetake/reply
    protected internal int? cgmID = null; // for local meta
    protected internal CodeGear cg = null; // for localtake
    protected internal DataGear<object> dg = null; // for put/localtake/reply
    protected internal Type clazz = null; // for remote
    protected internal Connection connection = null; // for reply
    
    //private CommandFactory factory = new CommandFactory();

    public CommandBuilder init(CommandType type) {
        this._type = type;
        this.type = new CommandTypeEtx(_type);
        this.key = null;
        this.toDgmName = null;
        this.fromDgmname = "local";
        this.cgmID = null;
        this.cg = null;
        this.dg = null;
        this.clazz = null;
        this.connection = null;
        return this;
    }
}
}