public IContent GetSingleton(string id) { var contentType = ContentTypeProvider.Get(id); var singleton = SingletonProvider.Get(id); return(ContainerSpecificContentGetter.Get <IContent>(singleton.Id, null, contentType.Container)); }
public string GetUrl(string id, string contentTypeId) { var contentType = ContentTypeProvider.Get(contentTypeId); var content = ContainerSpecificContentGetter.Get <IContent>(id, null, contentType.Container); return(UrlProvider.Get(content)); }
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)); }
public async Task <User> FindByIdAsync(string userId, CancellationToken cancellationToken) { return(await ContainerSpecificContentGetter.GetAsync <User>(userId, null, Container)); }