コード例 #1
0
        public async Task <Item> Get(string type, string value)
        {
            var contentType = ContentTypeProvider.Get(type);
            var content     = await ContainerSpecificContentGetter.GetAsync <IContent>(value, null, contentType.Container).ConfigureAwait(false);

            if (content == null)
            {
                return(null);
            }

            return(new Item((content as INameable)?.Name ?? content.Id, null, content.Id, (content as IImageable)?.Image));
        }
コード例 #2
0
 public async Task <User> FindByIdAsync(string userId, CancellationToken cancellationToken)
 {
     return(await ContainerSpecificContentGetter.GetAsync <User>(userId, null, Container));
 }