コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }