public IEnumerable <string[]> Execute(FeatureUsageRequest parameters) { var usages = _repository.Find(); var headerRow = new[] { "Application", "Feature", "Notes", "Usage", "UsedBy", "Year", "Month", "Day", "Hour", "Minute" }; var dataRows = usages.Select(u => new[] { u.ApplicationName, u.FeatureName, u.Notes.Replace(":", " "), "1", u.UsedBy.WithCleanUserName(), u.UsedDate.Year.ToString(), u.UsedDate.Month.ToString(), u.UsedDate.Day.ToString(), u.UsedDate.Hour.ToString(), u.UsedDate.Minute.ToString(), }); var jsonArray = new List <string[]> { headerRow }; jsonArray.AddRange(dataRows); return(jsonArray); }
public void BeforeAll() { _kernel = new StandardKernel(); ApplicationConfiguration.Configure(_kernel); _webRequest = Builder <FeatureUsageWebRequest> .CreateNew().Build(); var mapper = _kernel.Get <IMapper <FeatureUsageWebRequest, FeatureUsageRequest> >(); _result = mapper.Map(_webRequest); }
public void BeforeAll() { _kernel = new StandardKernel(); ApplicationConfiguration.Configure(_kernel); _webRequest = Builder<FeatureUsageWebRequest>.CreateNew().Build(); var mapper = _kernel.Get<IMapper<FeatureUsageWebRequest, FeatureUsageRequest>>(); _result = mapper.Map(_webRequest); }