public AssetFolderDomainObject(IStore <DomainId> store, IAssetQueryService assetQuery, ISemanticLog log) : base(store, log) { Guard.NotNull(assetQuery, nameof(assetQuery)); this.assetQuery = assetQuery; }
public GraphQLExecutionContext(QueryContext context, IAssetQueryService assetQueryService, IContentQueryService contentQuery, IGraphQLUrlGenerator urlGenerator) : base(context, assetQueryService, contentQuery) { UrlGenerator = urlGenerator; }
public AssetFolderResolver(ILocalCache localCache, IAssetQueryService assetQuery) { Guard.NotNull(localCache, nameof(localCache)); Guard.NotNull(assetQuery, nameof(assetQuery)); this.localCache = localCache; this.assetQuery = assetQuery; }
protected QueryExecutionContext(IAssetQueryService assetQuery, IContentQueryService contentQuery) { Guard.NotNull(assetQuery, nameof(assetQuery)); Guard.NotNull(contentQuery, nameof(contentQuery)); this.assetQuery = assetQuery; this.contentQuery = contentQuery; }
public AssetFolderDomainObject(IPersistenceFactory <State> factory, ISemanticLog log, IAssetQueryService assetQuery) : base(factory, log) { Guard.NotNull(assetQuery, nameof(assetQuery)); this.assetQuery = assetQuery; }
public static Task CanCreate(CreateAsset command, IAssetQueryService assetQuery) { Guard.NotNull(command); return(Validate.It(() => "Cannot upload asset.", async e => { await CheckPathAsync(command.ParentId, assetQuery, e); })); }
public static Task CanCreate(CreateAsset command, IAssetQueryService assetQuery) { Guard.NotNull(command, nameof(command)); return(Validate.It(async e => { await CheckPathAsync(command.AppId.Id, command.ParentId, assetQuery, e); })); }
public AssetsSearchSource(IAssetQueryService assetQuery, IUrlGenerator urlGenerator) { Guard.NotNull(assetQuery); Guard.NotNull(urlGenerator); this.assetQuery = assetQuery; this.urlGenerator = urlGenerator; }
public AssetFolderGrain(IStore <Guid> store, IAssetQueryService assetQuery, IActivationLimit limit, ISemanticLog log) : base(store, log) { Guard.NotNull(assetQuery); this.assetQuery = assetQuery; limit?.SetLimit(5000, Lifetime); }
public AssetDomainObject(IStore <Guid> store, ITagService tagService, IAssetQueryService assetQuery, ISemanticLog log) : base(store, log) { Guard.NotNull(tagService, nameof(tagService)); Guard.NotNull(assetQuery, nameof(assetQuery)); this.tagService = tagService; this.assetQuery = assetQuery; }
public QueryExecutionContext(QueryContext context, IAssetQueryService assetQuery, IContentQueryService contentQuery) { Guard.NotNull(assetQuery, nameof(assetQuery)); Guard.NotNull(contentQuery, nameof(contentQuery)); Guard.NotNull(context, nameof(context)); this.assetQuery = assetQuery; this.contentQuery = contentQuery; this.context = context; }
public ResolveAssets(IUrlGenerator urlGenerator, IAssetQueryService assetQuery, IRequestCache requestCache) { Guard.NotNull(urlGenerator); Guard.NotNull(assetQuery); Guard.NotNull(requestCache); this.urlGenerator = urlGenerator; this.assetQuery = assetQuery; this.requestCache = requestCache; }
public GraphQLExecutionContext(IAssetQueryService assetQuery, IContentQueryService contentQuery, IDataLoaderContextAccessor dataLoaderContextAccessor, DataLoaderDocumentListener dataLoaderDocumentListener, ICommandBus commandBus, IUrlGenerator urlGenerator, ISemanticLog log) : base(assetQuery, contentQuery) { this.commandBus = commandBus; this.dataLoaderContextAccessor = dataLoaderContextAccessor; this.dataLoaderDocumentListener = dataLoaderDocumentListener; this.urlGenerator = urlGenerator; this.log = log; }
public static Task CanMove(MoveAsset command, IAssetQueryService assetQuery, Guid oldParentId) { Guard.NotNull(command); return(Validate.It(() => "Cannot move asset.", async e => { if (command.ParentId != oldParentId) { await CheckPathAsync(command.ParentId, assetQuery, e); } })); }
public static Task CanMove(MoveAssetFolder command, IAssetQueryService assetQuery, DomainId id, DomainId oldParentId) { Guard.NotNull(command, nameof(command)); return(Validate.It(async e => { if (command.ParentId != oldParentId) { await CheckPathAsync(command.AppId.Id, command.ParentId, assetQuery, id, e); } })); }
private static async Task CheckPathAsync(Guid parentId, IAssetQueryService assetQuery, AddValidation e) { if (parentId != default) { var path = await assetQuery.FindAssetFolderAsync(parentId); if (path.Count == 0) { e("Asset folder does not exist.", nameof(MoveAsset.ParentId)); } } }
public ContentEnricher(IAssetQueryService assetQuery, IAssetUrlGenerator assetUrlGenerator, Lazy <IContentQueryService> contentQuery, IContentWorkflow contentWorkflow) { Guard.NotNull(assetQuery); Guard.NotNull(assetUrlGenerator); Guard.NotNull(contentQuery); Guard.NotNull(contentWorkflow); this.assetQuery = assetQuery; this.assetUrlGenerator = assetUrlGenerator; this.contentQuery = contentQuery; this.contentWorkflow = contentWorkflow; }
private static async Task CheckPathAsync(DomainId appId, DomainId parentId, IAssetQueryService assetQuery, AddValidation e) { if (parentId != DomainId.Empty) { var path = await assetQuery.FindAssetFolderAsync(appId, parentId); if (path.Count == 0) { e(T.Get("assets.folderNotFound"), nameof(MoveAsset.ParentId)); } } }
public static Task CanMove(MoveAsset command, IAssetEntity asset, IAssetQueryService assetQuery) { Guard.NotNull(command, nameof(command)); return(Validate.It(async e => { if (command.ParentId != asset.ParentId) { await CheckPathAsync(command.AppId.Id, command.ParentId, assetQuery, e); } })); }
public AssetsController( ICommandBus commandBus, IAssetQueryService assetQuery, IAssetUsageTracker assetStatsRepository, IAppPlansProvider appPlansProvider, ITagService tagService) : base(commandBus) { this.assetQuery = assetQuery; this.assetStatsRepository = assetStatsRepository; this.appPlansProvider = appPlansProvider; this.tagService = tagService; }
public AssetContentController( ICommandBus commandBus, IAssetFileStore assetFileStore, IAssetQueryService assetQuery, IAssetLoader assetLoader, IAssetThumbnailGenerator assetThumbnailGenerator) : base(commandBus) { this.assetFileStore = assetFileStore; this.assetQuery = assetQuery; this.assetLoader = assetLoader; this.assetThumbnailGenerator = assetThumbnailGenerator; }
public AssetDomainObject(IStore <DomainId> store, ISemanticLog log, IAssetTagService assetTags, IAssetQueryService assetQuery, IContentRepository contentRepository) : base(store, log) { Guard.NotNull(assetTags, nameof(assetTags)); Guard.NotNull(assetQuery, nameof(assetQuery)); Guard.NotNull(contentRepository, nameof(contentRepository)); this.assetTags = assetTags; this.assetQuery = assetQuery; this.contentRepository = contentRepository; }
public static Task CanCreate(CreateAssetFolder command, IAssetQueryService assetQuery) { Guard.NotNull(command); return(Validate.It(() => "Cannot upload asset.", async e => { if (string.IsNullOrWhiteSpace(command.FolderName)) { e(Not.Defined("Folder name"), nameof(command.FolderName)); } await CheckPathAsync(command.ParentId, assetQuery, Guid.Empty, e); })); }
public static Task CanCreate(CreateAssetFolder command, IAssetQueryService assetQuery) { Guard.NotNull(command, nameof(command)); return(Validate.It(async e => { if (string.IsNullOrWhiteSpace(command.FolderName)) { e(Not.Defined(nameof(command.FolderName)), nameof(command.FolderName)); } await CheckPathAsync(command.AppId.Id, command.ParentId, assetQuery, DomainId.Empty, e); })); }
public AssetsController( ICommandBus commandBus, IAssetQueryService assetQuery, IAssetStatsRepository assetStatsRepository, IAppPlansProvider appPlanProvider, IOptions <AssetConfig> assetsConfig, ITagService tagService) : base(commandBus) { this.assetsConfig = assetsConfig.Value; this.assetQuery = assetQuery; this.assetStatsRepository = assetStatsRepository; this.appPlanProvider = appPlanProvider; this.tagService = tagService; }
public AssetCommandMiddleware( IGrainFactory grainFactory, IAssetEnricher assetEnricher, IAssetFileStore assetFileStore, IAssetQueryService assetQuery, IContextProvider contextProvider, IEnumerable <IAssetMetadataSource> assetMetadataSources) : base(grainFactory) { this.assetEnricher = assetEnricher; this.assetFileStore = assetFileStore; this.assetMetadataSources = assetMetadataSources.OrderBy(x => x.Order).ToList(); this.assetQuery = assetQuery; this.contextProvider = contextProvider; }
public static Task CanMove(MoveAssetFolder command, IAssetQueryService assetQuery, Guid id, Guid oldParentId) { Guard.NotNull(command); return(Validate.It(() => "Cannot move asset.", async e => { if (command.ParentId == oldParentId) { e("Asset folder is already part of this folder.", nameof(command.ParentId)); } else { await CheckPathAsync(command.ParentId, assetQuery, id, e); } })); }
public AssetDomainObject(IPersistenceFactory <AssetDomainObject.State> factory, ISemanticLog log, IAssetTagService assetTags, IAssetQueryService assetQuery, IContentRepository contentRepository) : base(factory, log) { Guard.NotNull(assetTags, nameof(assetTags)); Guard.NotNull(assetQuery, nameof(assetQuery)); Guard.NotNull(contentRepository, nameof(contentRepository)); this.assetTags = assetTags; this.assetQuery = assetQuery; this.contentRepository = contentRepository; Capacity = int.MaxValue; }
public GraphQLExecutionContext( IDataLoaderContextAccessor dataLoaders, IAssetQueryService assetQuery, IAssetCache assetCache, IContentQueryService contentQuery, IContentCache contentCache, IServiceProvider serviceProvider, Context context) : base(assetQuery, assetCache, contentQuery, contentCache, serviceProvider) { this.dataLoaders = dataLoaders; Context = context.Clone(b => b .WithoutCleanup() .WithoutContentEnrichment()); }
protected QueryExecutionContext( IAssetQueryService assetQuery, IAssetCache assetCache, IContentQueryService contentQuery, IContentCache contentCache, IServiceProvider serviceProvider) { Guard.NotNull(serviceProvider); AssetQuery = assetQuery; AssetCache = assetCache; ContentQuery = contentQuery; ContentCache = contentCache; Services = serviceProvider; }