public OptionsParser(IIpAddressProcessor ipOptions, IOperatingSystemProcessor operatingSystemProcessor, IHostNameProcessor hostNameProcessor, IScript script) { _ipOptions = ipOptions; _operatingSystemProcessor = operatingSystemProcessor; _hostNameProcessor = hostNameProcessor; _script = script; }
public AggregateReportEnricher(IIpAddressProcessor ipAddressProcessor, IMessagePublisher publisher, IAggregateReportRecordEnrichedFactory aggregateReportRecordEnrichedFactory, IEnricherConfig enricherConfig, IOrganisationalDomainProvider organisationalDomainProvider, ILogger <AggregateReportEnricher> log) { _ipAddressProcessor = ipAddressProcessor; _publisher = publisher; _aggregateReportRecordEnrichedFactory = aggregateReportRecordEnrichedFactory; _enricherConfig = enricherConfig; _organisationalDomainProvider = organisationalDomainProvider; _log = log; }
public void GetIPEndpoint(IIpAddressProcessor ipAddressProcessor) { Get["/ip"] = parameters => { var ipAddress = ipAddressProcessor.GetIPAddress(); var ipAdressOutput = new MachineInformationResults { output = ipAddress }; return(Response.AsJson(ipAdressOutput)); }; }
public void GetIPEndpoint(IIpAddressProcessor ipAddressProcessor) { Get["/ip"] = parameters => { try { var ipAddress = ipAddressProcessor.GetIPAddress(); var ipAdressOutput = new MachineInformationResults { result = ipAddress }; return(Response.AsJson(ipAdressOutput)); } catch (Exception e) { return(HttpStatusCode.InternalServerError); } }; }
public IpEndpoint(IIpAddressProcessor ipAddressProcessor) { GetIPEndpoint(ipAddressProcessor); }