public ResourceStore(IMemoryCache cache, SquidexClientManager clientManager, IStringLocalizer <AppResources> localizer) : base(cache) { apiApiResources = clientManager.GetClient <ResourceEntity, ResourceData>("api-resources"); apiIdentityResources = clientManager.GetClient <ResourceEntity, ResourceData>("identity-resources"); this.localizer = localizer; }
public ApiClient(AppOptions options) { var clientManager = new SquidexClientManager( options.Url, options.AppName, options.ClientId, options.ClientSecret); pagesClient = clientManager.GetClient <Page, PageData>("pages"); postsClient = clientManager.GetClient <BlogPost, BlogPostData>("posts"); }
public static async Task <SquidexClient <TestEntity, TestEntityData> > BuildAsync(string schemaName) { await CreateAppIfNotExistsAsync(); await CreateSchemaIfNotExistsAsync(schemaName); return(ClientManager.GetClient <TestEntity, TestEntityData>(schemaName)); }
public SettingsProvider(SquidexClientManager clientManager, IMemoryCache cache, IOptions <SettingsData> defaults) : base(cache) { apiClient = clientManager.GetClient <SettingsEntity, SettingsData>("settings"); this.defaults = defaults; }
public SquidexRepo(IOptions <SquidexConfig> appOptions) { var options = appOptions.Value; var clientManager = new SquidexClientManager( options.Url, options.AppName, options.ClientId, options.ClientSecret); _blogCategoriesClient = clientManager.GetClient <BlogCategoryEntity, BlogCategoryData>("blog-categories"); _blogPostClient = clientManager.GetClient <BlogPostEntity, BlogPostData>("blog-posts"); _blogPostTagClient = clientManager.GetClient <BlogPostTagEntity, BlogPostTagData>("blog-post-tags"); _globalClient = clientManager.GetClient <GlobalConfigEntity, GlobalConfigData>("global"); _profileClient = clientManager.GetClient <ProfileEntity, ProfileData>("profile"); }
public ApiClient(IOptions <AppOptions> appOptions) { var options = appOptions.Value; var clientManager = new SquidexClientManager( options.Url, options.AppName, options.ClientId, options.ClientSecret); pagesClient = clientManager.GetClient <Page, PageData>("pages"); heroesClient = clientManager.GetClient <Hero, HeroData>("heroes"); articlesClient = clientManager.GetClient <Article, ArticleData>("articles"); authorsClient = clientManager.GetClient <Author, AuthorData>("authors"); categoriesClient = clientManager.GetClient <Category, CategoryData>("categories"); }
public SquidexRepo(IOptions <SquidexConfig> appOptions, ICacheProvider cache) { var options = appOptions.Value; var clientManager = new SquidexClientManager( options.Url, options.AppName, options.ClientId, options.ClientSecret); _portfolioProjectsClient = clientManager.GetClient <PortfolioProjectEntity, PortfolioProjectData>("portfolio-projects"); _blogPostClient = clientManager.GetClient <BlogPostEntity, BlogPostData>("blog-posts"); _skillTypesClient = clientManager.GetClient <SkillTypeEntity, SkillTypeData>("skill-types"); _globalClient = clientManager.GetClient <GlobalEntity, GlobalData>("global"); _portfolioClient = clientManager.GetClient <PortfolioEntity, PortfolioData>("portfolio"); _cache = cache; }
public FeaturesService(IOptions <MyNewsOptions> options) { if (options.Value.IsConfigured()) { var clientManager = new SquidexClientManager("https://cloud.squidex.io", options.Value.AppName, options.Value.ClientId, options.Value.ClientSecret); client = clientManager.GetClient <NewsEntity, FeatureDto>("feature-news"); } }
public SquidexRepo(IOptions <SquidexSettings> appOptions) { var options = appOptions.Value; var clientManager = new SquidexClientManager( options.Url, options.AppName, options.ClientId, options.ClientSecret); _portfolioProjectsClient = clientManager.GetClient <ProjectEntity, ProjectData>(CacheConstants.SquidexSchemas.Projects); _blogPostClient = clientManager.GetClient <BlogPostEntity, BlogPostData>(CacheConstants.SquidexSchemas.BlogPosts); _globalClient = clientManager.GetClient <GlobalEntity, GlobalData>(CacheConstants.SquidexSchemas.Global); _authorsClient = clientManager.GetClient <AuthorEntity, AuthorData>(CacheConstants.SquidexSchemas.Authors); _pageAboutClient = clientManager.GetClient <PageAboutEntity, PageAboutData>(CacheConstants.SquidexSchemas.Pages.About); _pageContactClient = clientManager.GetClient <PageContactEntity, PageContactData>(CacheConstants.SquidexSchemas.Pages.Contact); _pageIndexClient = clientManager.GetClient <PageIndexEntity, PageIndexData>(CacheConstants.SquidexSchemas.Pages.Index); _pageProjectsClient = clientManager.GetClient <PageProjectsEntity, PageProjectsData>(CacheConstants.SquidexSchemas.Pages.Projects); _pageSearchResultsClient = clientManager.GetClient <PageSearchResultsEntity, PageSearchResultsData>(CacheConstants.SquidexSchemas.Pages.SearchResults); }
public ClientStore(SquidexClientManager clientManager) { apiClient = clientManager.GetClient <ClientEntity, ClientData>("clients"); apiClientManager = clientManager; }
public static SquidexClient <TestEntity, TestEntityData> Build() { return(ClientManager.GetClient <TestEntity, TestEntityData>("numbers")); }
public UserStore(SquidexClientManager clientManager) { apiClient = clientManager.GetClient <UserEntity, UserData>("users"); }
public ResourceStore(IMemoryCache cache, SquidexClientManager clientManager) : base(cache) { apiApiResources = clientManager.GetClient <ResourceEntity, ResourceData>("api-resources"); apiIdentityResources = clientManager.GetClient <ResourceEntity, ResourceData>("identity-resources"); }
public static SquidexClient <TestEntity, TestEntityData> Build() { return(ClientManager.GetClient <TestEntity, TestEntityData>(TestSchemaName)); }
private async Task LoadSkillsAsync(HomeVM vm) { var records = await clientManager.GetClient <Skill, SkillData>("skills").GetAsync(); vm.Skills = records.Items; }
public AuthenticationSchemeStore(SquidexClientManager clientManager, IMemoryCache cache) : base(cache) { apiClient = clientManager.GetClient <AuthenticationSchemeEntity, AuthenticationSchemeData>("authentication-schemes"); }