Exemple #1
0
        public async Task <Output <T> > GetOutputAsync <T>(string filename)
        {
            var result = await GetOutput <string>(filename, 0);

            if (result.Running)
            {
                await Task.Delay(TimeSpan.FromSeconds(3));

                return(await GetOutputAsync <T>(filename));
            }

            result.Content = result.Content.Replace(@"\\\", string.Empty);
            result.Content = result.Content.Replace(@"\""", "\"");
            var toto = new Output <T> {
                Filename = result.Filename, Pos = result.Pos, Running = result.Running
            };

            var serializer = new OmvSerializer();

            toto.Content = serializer.Deserialize <T>(result.Content);

            return(toto);
        }
        public async Task <Output <string> > GetOutputAsync(string filename)
        {
            var result = await _omvExecClient.GetOutput <string>(filename, 0);

            if (result.Running)
            {
                await Task.Delay(TimeSpan.FromSeconds(3));

                return(await GetOutputAsync(filename));
            }

            result.Content = result.Content.Replace(@"\\\", string.Empty);
            result.Content = result.Content.Replace(@"\""", "\"");
            var toto = new Output <string>();

            toto.Filename = result.Filename;
            toto.Pos      = result.Pos;
            toto.Running  = result.Running;
            var serializer = new OmvSerializer();

            toto.Content = result.Content;

            return(toto);
        }
 public OmvRequestBase(string commandText)
 {
     CommandText = commandText;
     Handler     = new OmvSerializer();
 }