예제 #1
0
        public virtual void Delete(GrpcConnection connection, GrpcSbFrame grpcSbFrame)
        {
            var client = new RemoteFrameRpcService.RemoteFrameRpcServiceClient(
                connection.CallInvoker);

            connection
            .GetOrCreateBulkDeleter <GrpcSbFrame>()
            .QueueForDeletion(grpcSbFrame, (List <GrpcSbFrame> frames) =>
            {
                var request = new BulkDeleteRequest();
                request.Frames.AddRange(frames);
                connection.InvokeRpc(() =>
                {
                    client.BulkDelete(request);
                });
            });
        }
예제 #2
0
        internal RemoteFrameProxy(GrpcConnection connection, GrpcSbFrame grpcSbFrame,
                                  RemoteFrameRpcService.RemoteFrameRpcServiceClient client,
                                  GrpcModuleFactory moduleFactory, GrpcThreadFactory threadFactory,
                                  GrpcValueFactory valueFactory,
                                  GrpcFunctionFactory functionFactory,
                                  GrpcSymbolFactory symbolFactory)
        {
            this.connection      = connection;
            this.grpcSbFrame     = grpcSbFrame;
            this.client          = client;
            this.moduleFactory   = moduleFactory;
            this.threadFactory   = threadFactory;
            this.valueFactory    = valueFactory;
            this.functionFactory = functionFactory;
            this.symbolFactory   = symbolFactory;

            // Keep a handle to objects we need in the destructor.
            gcHandle = GCHandle.Alloc(
                new Tuple <
                    GrpcConnection, RemoteFrameRpcService.RemoteFrameRpcServiceClient, GrpcSbFrame>
                    (connection, client, grpcSbFrame));
        }