Beispiel #1
0
 public OptionsParser(IIpAddressProcessor ipOptions, IOperatingSystemProcessor operatingSystemProcessor, IHostNameProcessor hostNameProcessor, IScript script)
 {
     _ipOptions = ipOptions;
     _operatingSystemProcessor = operatingSystemProcessor;
     _hostNameProcessor        = hostNameProcessor;
     _script = script;
 }
Beispiel #2
0
 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));
     };
 }
Beispiel #4
0
 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);
 }