Beispiel #1
0
        private async Task <T> ProcessAsync <T>(IOrientDBOperation <T> operation, OrientDBNetworkConnection stream)
        {
            try
            {
                var request = operation.CreateRequest(stream.SessionId, stream.Token);

                var reader = await SendAsync(request, stream.GetStream());

                return(operation.Execute(reader));
            }
            catch
            {
                Destroy(stream);
                throw;
            }
        }
Beispiel #2
0
        private T Process <T>(IOrientDBOperation <T> operation, OrientDBNetworkConnection stream)
        {
            try
            {
                Request request = operation.CreateRequest(stream.SessionId, stream.Token);

                var reader = Send(request, stream.GetStream());

                T result = operation.Execute(reader);

                return(result);
            }
            catch
            {
                Destroy(stream);
                throw;
            }
        }