Пример #1
0
 public Session(IExpectable expectable)
 {
     Expectable = expectable;
 }
Пример #2
0
 public static Session Spawn(IExpectable expectable)
 {
     expectable.Start();
     return(new Session(expectable));
 }
Пример #3
0
 public Session(IExpectable expectable)
 {
     _timeout    = _defaultTimeout;
     _expectable = expectable;
 }
Пример #4
0
 public ActionContext(IExpectable expectable, ItemsCache itemsCache)
 {
     Expectable = expectable ?? throw new ArgumentNullException(nameof(expectable));
     ItemsCache = itemsCache ?? throw new ArgumentNullException(nameof(itemsCache));
 }
Пример #5
0
        /// <summary>
        ///     Reads in synchronous way from both standard input and standard error streams.
        /// </summary>
        /// <returns>text read from streams</returns>
        public static string Read(this IExpectable expectable)
        {
            var task = Task.Run(async() => await expectable.ReadAsync().ConfigureAwait(false));

            return(task.Result);
        }