Exemplo n.º 1
0
        public async Task <IContentEntity> FindContentAsync(IAppEntity app, ISchemaEntity schema, Status[] status, Guid id, bool includeDraft = true)
        {
            Guard.NotNull(app, nameof(app));
            Guard.NotNull(schema, nameof(schema));

            using (Profiler.TraceMethod <MongoContentRepository>())
            {
                return(await contents.FindContentAsync(schema, id, status, includeDraft));
            }
        }
Exemplo n.º 2
0
 public Task <IContentEntity?> FindContentAsync(IAppEntity app, ISchemaEntity schema, DomainId id, SearchScope scope)
 {
     if (scope == SearchScope.All)
     {
         return(collectionAll.FindContentAsync(schema, id));
     }
     else
     {
         return(collectionPublished.FindContentAsync(schema, id));
     }
 }
Exemplo n.º 3
0
 public Task <IContentEntity?> FindContentAsync(IAppEntity app, ISchemaEntity schema, DomainId id, SearchScope scope,
                                                CancellationToken ct = default)
 {
     if (scope == SearchScope.All)
     {
         return(collectionAll.FindContentAsync(schema, id, ct));
     }
     else
     {
         return(collectionPublished.FindContentAsync(schema, id, ct));
     }
 }
Exemplo n.º 4
0
        public async Task <IContentEntity> FindContentAsync(IAppEntity app, ISchemaEntity schema, Status[] status, Guid id)
        {
            Guard.NotNull(app, nameof(app));
            Guard.NotNull(schema, nameof(schema));
            Guard.NotNull(status, nameof(status));

            using (Profiler.TraceMethod <MongoContentRepository>())
            {
                var useDraft = UseDraft(status);

                return(await contents.FindContentAsync(app, schema, id, status, useDraft));
            }
        }