/// <summary> /// Function registers the classes in the FreshMVVM IOC container. /// </summary> private void RegisterServices() { GiphyService giphyService = new GiphyService(); SearchCacheService searchCacheService = new SearchCacheService(); GifCollectionService gifCollectionService = new GifCollectionService(); GifDataService gifDataService = new GifDataService(); FreshIOC.Container.Register(giphyService); FreshIOC.Container.Register(searchCacheService); FreshIOC.Container.Register(gifCollectionService); FreshIOC.Container.Register(gifDataService); }
private void RenderAllPages(IHostingEnvironment env, IServiceProvider services) { IDocsService docsService = services.GetService <IDocsService>(); RenderAll <IPageService>(env, services, "pages"); RenderAll <IDocsService>(env, services, "docs"); // RenderAll<IBlogCacheService>(env, services, "blog") RenderDocsIndex(env, docsService); string docsPath = Path.Combine(env.ContentRootPath, "wwwroot", "content", "docs"); DocsSearch = new SearchCacheService(docsPath, docsService); }