Beispiel #1
0
        public static IReportFactory AddInfluxDb(this IReportFactory factory, IMetricsFilter filter = null)
        {
            var settings = new InfluxDbReporterSettings();

            factory.AddInfluxDb(settings, filter);
            return(factory);
        }
Beispiel #2
0
 public MonthSummaryReport(IMonthSummaryReportDataProvider reportDataProvider, IReportFactory reportFactory,
                           IOptions <ReportSettings> reportSettings)
 {
     _reportDataProvider = reportDataProvider;
     _reportFactory      = reportFactory;
     _reportSettings     = reportSettings.Value;
 }
Beispiel #3
0
        public static IReportFactory AddTextFile(this IReportFactory factory, IMetricsFilter filter = null)
        {
            var settings = new TextFileReporterSettings();

            factory.AddTextFile(settings, filter);
            return(factory);
        }
Beispiel #4
0
        public void Download(String fileType)
        {
            DataTable      overAllExpenseTable = expenseRepository.GetOverallExpenses().Tables[0];
            IReportFactory reportFactory       = ReportFactoryCreator.CreateReportInstance(ReportType.Expense);

            reportFactory.GenerateReport(overAllExpenseTable, fileType.ConvertToEnum <ReportFormat>(), ReportType.Expense);
        }
Beispiel #5
0
 public SpecRunner(IAssemblyTypeLoader assemblyType, ISpecFinder finder,
                   IReportFactory factory, ParentClassRuleExecutor executor)
 {
     _assemblyType = assemblyType;
     _finder = finder;
     _factory = factory;
     _executor = executor;
 }
    public async Task <IActionResult> CacheGetOrCreateAsync()
    {
        IReportFactory reportFactory = this._createReportFactoryDelegate(this.HttpContext);
        var            x             = reportFactory.Create();

        // ...
        return(View("Cache", cacheEntry));
    }
 public static IReportFactory AddElasticSearch(
     this IReportFactory factory,
     ElasticSearchReporterSettings settings,
     IFilterMetrics filter = null)
 {
     factory.AddProvider(new ElasticSearchReporterProvider(settings, filter));
     return(factory);
 }
Beispiel #8
0
 public static IReportFactory AddGraphite(
     this IReportFactory factory,
     GraphiteReporterSettings settings,
     IFilterMetrics filter = null)
 {
     factory.AddProvider(new GraphiteReporterProvider(settings, filter));
     return(factory);
 }
 public static IReportFactory AddInfluxDb(
     this IReportFactory factory,
     InfluxDBReporterSettings settings,
     IFilterMetrics filter = null)
 {
     factory.AddProvider(new InfluxDbReporterProvider(settings, filter));
     return(factory);
 }
Beispiel #10
0
        public CommandStateMachine(HidDevice hidDevice, IReportFactory reportFactory, IResponseValidator responseValidator)
        {
            //logger.Trace("new CommandStateMachine()");

            device    = hidDevice;
            factory   = reportFactory;
            validator = responseValidator;
            extractor = new ReportDataExtractorVisitor();
        }
Beispiel #11
0
 public ClientHomeController()
 {
     this.userFactory        = new UserFactory();
     this.claimFactory       = new ClaimFactory();
     this.claimStatusFactory = new ClaimStatusFactory();
     this.fieldTypeFactory   = new FieldTypeFactory();
     this.countryFactory     = new CountryFactory();
     this.reportFactory      = new ReportFactory();
 }
        public static IReportFactory AddConsole(
            this IReportFactory factory,
            IFilterMetrics filter = null)
        {
            var settings = new ConsoleReporterSettings();

            factory.AddConsole(settings, filter);
            return(factory);
        }
Beispiel #13
0
 public ClientHomeController(IUserFactory userFactory, IClaimFactory claimFactory2, IClaimStatusFactory claimStatusFactory, IClaimTemplateFactory claimTemplateFactory, IFieldTypeFactory fieldTypeFactory, ICountryFactory countryFactory, IReportFactory reportFactory)
 {
     this.userFactory          = userFactory;
     this.claimFactory         = claimFactory2;
     this.claimStatusFactory   = claimStatusFactory;
     this.claimTemplateFactory = claimTemplateFactory;
     this.fieldTypeFactory     = fieldTypeFactory;
     this.countryFactory       = countryFactory;
     this.reportFactory        = reportFactory;
 }
        public ActionResult Download(String fileType)
        {
            DataTable      BudgetSummaryTable = budgetRepository.GetBudgetSummary().Tables[0];
            IReportFactory reportFactory      = ReportFactoryCreator.CreateReportInstance(ReportType.BudgetSummary);
            ReportFormat   reportFormat;

            Enum.TryParse <ReportFormat>(fileType, true, out reportFormat);
            reportFactory.GenerateReport(BudgetSummaryTable, reportFormat, ReportType.BudgetSummary);
            return(View());
        }
 public CreateReportCommandHandler(
     ICurrentUser currentUser,
     IReporterDomainRepository reporterRepository,
     IReportDomainRepository reportRepository,
     IReportFactory reportFactory)
 {
     this.currentUser        = currentUser;
     this.reporterRepository = reporterRepository;
     this.reportRepository   = reportRepository;
     this.reportFactory      = reportFactory;
 }
Beispiel #16
0
 public MenuViewModel(
     IProjectData projectData,
     IBusy busy, IReportFactory reportFactory,
     IProcess processApi, IDialogs dialogs)
 {
     this.busy          = busy;
     this.projectData   = projectData;
     this.processApi    = processApi;
     this.dialogs       = dialogs;
     this.reportFactory = reportFactory;
 }
Beispiel #17
0
        public static IReportFactory AddInfluxDb(this IReportFactory factory,
                                                 string database, Uri baseAddress,
                                                 IMetricsFilter filter = null)
        {
            var settings = new InfluxDBReporterSettings
            {
                InfluxDbSettings = new InfluxDBSettings(database, baseAddress)
            };

            factory.AddInfluxDb(settings, filter);
            return(factory);
        }
        public List <PathologyReportContainer> GetAll()
        {
            var Result = new List <PathologyReportContainer>();
            IEnumerable <Type> IReportTypeList = GetTypesWithInterface(System.Reflection.Assembly.GetExecutingAssembly());

            foreach (Type IReportType in IReportTypeList)
            {
                IReportFactory ReportFactory = (IReportFactory)Activator.CreateInstance(IReportType, PatientFactory, ProviderFactory, LaboratoryFactory);
                Result.Add(ReportFactory.GetReport());
            }
            return(Result);
        }
Beispiel #19
0
        public static IReportFactory AddGraphite(
            this IReportFactory factory,
            Uri baseAddress,
            IFilterMetrics filter = null)
        {
            var settings = new GraphiteReporterSettings
            {
                GraphiteSettings = new GraphiteSettings(baseAddress)
            };

            factory.AddGraphite(settings, filter);
            return(factory);
        }
        public static IReportFactory AddElasticSearch(
            this IReportFactory factory,
            Uri address,
            string indexName,
            IFilterMetrics filter = null)
        {
            var settings = new ElasticSearchReporterSettings
            {
                ElasticSearchSettings = new ElasticSearchSettings(address, indexName)
            };

            factory.AddElasticSearch(settings, filter);
            return(factory);
        }
Beispiel #21
0
        public ReportsController(IClaimTemplateFactory claimTemplateFactory, IClaimFieldTemplateFactory claimFieldTemplateFactory, IReportFactory reportFactory,
                                 IReportFieldFactory reportFieldFactory,
                                 Acturis.Factories.IActurisClaimFactory acturisFactory)
        {
            _claimTemplateFactory      = claimTemplateFactory;
            _claimFieldTemplateFactory = claimFieldTemplateFactory;
            _reportFactory             = reportFactory;

            _reportFieldFactory = reportFieldFactory;
            _acturisFactory     = acturisFactory;


            _functionTypes = new List <ListElement>
            {
                new ListElement {
                    Name = "Value of", Value = "FIELDVALUE"
                },
                new ListElement {
                    Name = "Sum", Value = "SUM"
                },
                new ListElement {
                    Name = "Number of", Value = "Count"
                },
                new ListElement {
                    Name = "Average", Value = "AVG"
                },
                new ListElement {
                    Name = "Maximum", Value = "MAX"
                },
                new ListElement {
                    Name = "Minimum", Value = "MIN"
                },
                new ListElement {
                    Name = "Median", Value = "MED"
                }
            };

            _sortDirection = new List <ListElement>
            {
                new ListElement {
                    Name = "ASC", Value = "Ascending"
                },
                new ListElement {
                    Name = "DESC", Value = "Descending"
                }
            };
        }
Beispiel #22
0
        public ReportService(IRepository <User> userRepository,
                             IRepository <Report> reportRepository,
                             IRepository <Post> postRepository,
                             IReportFactory reportFactory,
                             IUnitOfWork unitOfWork)
        {
            Guard.WhenArgument(userRepository, "userRepository cannot be null").IsNull().Throw();
            Guard.WhenArgument(reportRepository, "reportRepository cannot be null").IsNull().Throw();
            Guard.WhenArgument(postRepository, "postRepository cannot be null").IsNull().Throw();
            Guard.WhenArgument(reportFactory, "reportFactory cannot be null").IsNull().Throw();
            Guard.WhenArgument(unitOfWork, "unitOfWork cannot be null").IsNull().Throw();

            this.userRepository   = userRepository;
            this.reportRepository = reportRepository;
            this.postRepository   = postRepository;
            this.reportFactory    = reportFactory;
            this.unitOfWork       = unitOfWork;
        }
Beispiel #23
0
        /// <summary>
        /// Generate the associated report file based on the ReportFactory provided.
        /// </summary>
        /// <param name="self">The Report Factory referenced by the extension method</param>
        /// <returns></returns>
        public static async Task <ReportFile> WriteReport(this IReportFactory self)
        {
            ReportFile res;
            string     fileName = $"{Guid.NewGuid()}.csv";
            string     path     = $"{REPORT_DIR}/{fileName}";

            System.IO.File.WriteAllText(path, await self.GenerateCsv());
            using (var db = new Db())
            {
                db.ReportFiles.Add(res = new ReportFile()
                {
                    CreatedAt = DateTime.Now,
                    FileName  = fileName,
                    Type      = self.Type
                });
                await db.SaveChangesAsync();
            }
            return(res);
        }
Beispiel #24
0
        public static IReportFactory AddGraphite(
            this IReportFactory factory,
            string host,
            int port,
            ConnectionType connectionType = ConnectionType.Tcp,
            string metricTemplate         = null,
            IFilterMetrics filter         = null)
        {
            var settings = new GraphiteReporterSettings
            {
                Host                = host,
                Port                = port,
                ConnectionType      = connectionType,
                MetricNameFormatter = string.IsNullOrEmpty(metricTemplate)
                    ? new GraphiteMetricNameFormatter()
                    : new GraphiteMetricNameFormatter(metricTemplate)
            };

            factory.AddGraphite(settings, filter);
            return(factory);
        }
Beispiel #25
0
        public (bool created, string errorMessage) GenerateReport(TypeOfReport typeOfReport, IDatabaseWrapper databaseWrapper, IReportFactory factory, int id)
        {
            if (databaseWrapper is null)
            {
                throw new System.ArgumentNullException(nameof(databaseWrapper));
            }

            if (factory is null)
            {
                throw new System.ArgumentNullException(nameof(factory));
            }

            var report = factory.CreateReport(typeOfReport, databaseWrapper);

            return(report.Generate(id));
        }
Beispiel #26
0
 private FakeMenuregistrator
     (MenuActionManager menuManager, IReportFactory reportFactory, MenuAction.ActionHandler avrActionHandler)
     : base(menuManager, reportFactory, avrActionHandler)
 {
 }
 public EmailReport(IReportFactory reportFactory)
 {
     this._reportFactory = reportFactory;
 }
        private static MenuViewModel CreateSut(out ProjectData projectData, out IDialogs dialogs, out IReportFactory reportFactory)
        {
            var windowManager = Substitute.For <IWindowManager>();
            var fileSystem    = Substitute.For <IFileSystem>();
            var processApi    = Substitute.For <IProcess>();

            dialogs = Substitute.For <IDialogs>();
            var busy = Substitute.For <IBusy>();

            reportFactory = Substitute.For <IReportFactory>();
            var settings = new Settings();

            projectData = new ProjectData(settings, windowManager, dialogs, fileSystem, processApi);
            var sut = new MenuViewModel(projectData, busy, reportFactory, processApi, dialogs);

            return(sut);
        }
        private static MenuViewModel CreateSut(out ProjectData projectData, out IReportFactory reportFactory)
        {
            var sut = CreateSut(out projectData, out IDialogs _, out reportFactory);

            return(sut);
        }
Beispiel #30
0
        //
        // GET: /WillisAssociate/WillisAssociate/



        public WillisAssociateController(IClientFactory clientFactory, IClaimTemplateFactory claimTemplateFactory, IReportFactory reportFactory)
        {
            this.clientFactory        = clientFactory;
            this.claimTemplateFactory = claimTemplateFactory;
            this.reportFactory        = reportFactory;
        }
Beispiel #31
0
 public static IReportFactory AddTextFile(this IReportFactory factory,
                                          ITextFileReporterSettings settings, IMetricsFilter filter = null)
 {
     factory.AddProvider(new TextFileReporterProvider(settings, filter));
     return(factory);
 }