Example #1
0
        public void Contains_Test()
        {
            var itemPath = userContext.Dispatcher.Invoke(() => userContext.Random().Path);
            var contains = userContext.Dispatcher.Invoke(() => userContext.Contains(itemPath));

            Assert.IsTrue(contains);
        }
Example #2
0
        public IActionResult PutUser(long id, UserDto userDto)
        {
            if (id != userDto.Id)
            {
                return(BadRequest());
            }

            _context.SetEntryState(userDto, EntityState.Modified);

            try
            {
                _context.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!_context.Contains(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(Ok());
        }
 public static Task <bool> ContainsAsync(this IUserContext userContext, string itemPath)
 {
     return(userContext.Dispatcher.InvokeAsync(() => userContext.Contains(itemPath)));
 }
Example #4
0
 public void Contains()
 {
     userContext.Contains(PathUtility.Separator);
 }