public async Task <string> GetFileContent(string path) { if (!_extensionBundleManager.IsExtensionBundleConfigured()) { _logger.ContentProviderNotConfigured(path); return(null); } var bundlePath = await _extensionBundleManager.GetExtensionBundlePath(); string contentFilePath = Path.Combine(bundlePath, path); if (FileUtility.FileExists(contentFilePath)) { return(await FileUtility.ReadAsync(contentFilePath)); } else { _logger.ContentFileNotFound(contentFilePath); return(null); } }
private async Task <string> GetBundleProjectPath() { string bundlePath = await _extensionBundleManager.GetExtensionBundlePath(); return(!string.IsNullOrEmpty(bundlePath) ? Path.Combine(bundlePath, ExtensionsProjectFileName) : null); }