using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication1 {
public partial class Form1 : Form {
private ITemplateInteraction _templateInteraction = new TemplateInteraction();
private async void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) {
var result = await _templateInteraction.GetProjectTemplateFile(1,
public class TemplateInteraction : ITemplateInteraction {
public async Task<ProjectTemplateFile> GetProjectTemplateFile(long companyId, string sourceLanguage, string targetLanguage) {
public interface ITemplateInteraction {
Task<ProjectTemplateFile> GetProjectTemplateFile(long companyId, string sourceLanguage, string targetLanguage);
public class ProjectTemplateFile {