public async Task <IDataResult <ResponseStream> > ReceiveResult(IListener listen, int port)
        {
            var checkReceive = await _imageDetectedService.ReceiveResult(listen, port);

            var errorDataResult = new ErrorDataResult <ResponseStream>();

            if (listen == null)
            {
                errorDataResult.AddMessage("InvalidParameters", "Nesnenin örneği oluşturulmamış.");
                return(errorDataResult);
            }

            if (checkReceive == null)
            {
                errorDataResult.AddMessage("InvalidParameters", "Dönüş verisi boş.");
                return(errorDataResult);
            }

            if (checkReceive.Length == 0)
            {
                errorDataResult.AddMessage("InvalidLength", "Geçersiz veri.");
                return(errorDataResult);
            }

            var stream = ResultParse <ResponseStream> .jsonDeserialize(checkReceive);

            return(new SuccessDataResult <ResponseStream>(stream));
        }
        public Task SendResult(Stream stream)
        {
            var getStreamToString = ResultParse <Stream> .jsonSerialize(stream);

            var getBytes = Encoding.ASCII.GetBytes(getStreamToString);

            return(_imageDetectedService.SendResult(getBytes));
        }