momcina08

Results 6 comments of momcina08

also if i have this code: var sftpClient = new SftpClient(host, port, username, password); sftpClient.Connect(); var stream = sftpClient.OpenRead(path); var x = stream.CanSeek; var y = stream.Position; var z =...

But what if i want to pass that stream to a different method and use StreamReader on it? I always get that stream is not seekable, i dont want to...

in the next method i do this: StreamReader streamReader = new(request.Stream); //request.Stream is the SftpFileStream var reader = new JsonTextReader(streamReader); reader.Read(); //this throws the " Seek operation failed" and that...

namespace MyNamespace.Handlers.Interfaces; using Microsoft.Extensions.Logging; using Renci.SshNet; using System.IO; public interface ISftpStreamConnector { Task GetStream(string path, string username, string password, int port, string host); Task CloseStream(); } public class SftpStreamConnector :...

Yes, but they are all trace of my outer classes up until this invocation, nothing relevant. Please, give it a try and you'll see.

OpenRead or OpenAsync lose their purpose if we cant do anything with the stream outside of the method. Stream purpose is to not inflate the memory but processing on the...