Exemplo n.º 1
0
        public Pos RegisterPos(Pos pos)
        {
            Ensure.NotNull(pos, nameof(pos));
            Ensure.NotNull(pos.PosId, nameof(pos.PosId));

            return _poses[pos.PosId] = pos;
        }
Exemplo n.º 2
0
        private async Task<IResponse> Confirm(Pos pos, string content)
        {
            Ensure.NotNull(pos, nameof(pos));
            Ensure.NotNull(content, nameof(content));

            ConfirmRequest confirmRequest = Converter.Deserialize<ConfirmRequest>(content);
            if (confirmRequest == null)
                throw new Exception($"Received request cannot {nameof(content)} be deserialized: {content}");

            return await pos.ConfirmAsync(confirmRequest);
        }