示例#1
0
        public override Task ExecuteAsync(string[] arguments)
        {
            var argument = arguments.FirstOrDefault();

            if (string.IsNullOrWhiteSpace(argument))
            {
                ListThings(_thingRepository.ToArray());

                return(Task.CompletedTask);
            }

            var things = _thingRepository
                         .Where(x => x.Id.Gateway.Equals(argument, StringComparison.InvariantCultureIgnoreCase))
                         .ToArray();

            ListThings(things);

            return(Task.CompletedTask);
        }