예제 #1
0
        public async Task <EnvironmentResponse> WriteStartAsync(ISession session, ConnectionMode mode, string secret)
        {
            var response = await session.ReadAsync();

            RequestWriterAssert.Connected(response);

            await session.WriteAsync("START", mode.ToString().ToLowerInvariant(), secret);

            return(StartResponseParser.Parse(await session.ReadAsync()));
        }
예제 #2
0
        public EnvironmentResponse WriteStart(ISession session, ConnectionMode mode, string secret)
        {
            var response = session.Read();

            RequestWriterAssert.Connected(response);

            session.Write("START", mode.ToString().ToLowerInvariant(), secret);

            return(StartResponseParser.Parse(session.Read()));
        }