internal SbCommandInterpreterImpl(GrpcConnection connection,
                                   GrpcSbCommandInterpreter grpcSbInterpreter)
     : this(connection,
            new SbCommandInterpreterRpcServiceClient(connection.CallInvoker),
            grpcSbInterpreter, new GrpcSbCommandInterpreterFactory(),
            new GrpcSbCommandReturnObjectFactory())
 {
 }
        internal SbCommandInterpreterImpl(
            GrpcConnection connection, SbCommandInterpreterRpcServiceClient client,
            GrpcSbCommandInterpreter grpcSbInterpreter,
            GrpcSbCommandInterpreterFactory commandInterpreterFactory,
            GrpcSbCommandReturnObjectFactory returnObjectFactory)
        {
            this.connection                = connection;
            this.client                    = client;
            this.grpcSbInterpreter         = grpcSbInterpreter;
            this.commandInterpreterFactory = commandInterpreterFactory;
            this.returnObjectFactory       = returnObjectFactory;

            // Keep a handle to objects we need in the destructor.
            gcHandle = GCHandle.Alloc(
                new Tuple <GrpcConnection,
                           SbCommandInterpreterRpcServiceClient,
                           GrpcSbCommandInterpreter>(
                    connection, client, grpcSbInterpreter));
        }
 public virtual SbCommandInterpreter Create(
     GrpcConnection connection, GrpcSbCommandInterpreter grpcSbCommandInterpreter)
 {
     return(new SbCommandInterpreterImpl(connection, grpcSbCommandInterpreter));
 }