Example #1
0
        internal SbCommandReturnObjectImpl(
            GrpcConnection connection, SbCommandReturnObjectRpcServiceClient client,
            GrpcSbCommandReturnObject grpcSbReturnObject,
            GrpcSbCommandReturnObjectFactory returnObjectFactory)
        {
            this.connection          = connection;
            this.client              = client;
            this.grpcSbReturnObject  = grpcSbReturnObject;
            this.returnObjectFactory = returnObjectFactory;

            // Keep a handle to objects we need in the destructor.
            gcHandle = GCHandle.Alloc(
                new Tuple <GrpcConnection,
                           SbCommandReturnObjectRpcServiceClient,
                           GrpcSbCommandReturnObject>(
                    connection, client, grpcSbReturnObject));
        }
        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));
        }