static void SampleRun() { Console.WriteLine("this Programm reads the memory of the eve online client process."); Console.WriteLine("start an eve online client and login to your account. Then press any key to continue.\n"); Console.ReadKey(); var Config = Extension.ConfigReadFromConsole(); if (null == Config) { Console.WriteLine("reading config failed."); return; } var LicenseClient = new BotEngine.Interface.LicenseClient() { ServerAddress = Config.LicenseServerAddress, LicenseKey = Config.LicenseKey }; Console.WriteLine(); Console.WriteLine("connecting to " + (LicenseClient?.ServerAddress ?? "") + " using Key \"" + (LicenseClient?.LicenseKey ?? "") + "\" ...."); while (!LicenseClient.AuthCompleted) { LicenseClient.ExchangeAuth(); Thread.Sleep(1111); } var AuthResult = LicenseClient?.ExchangeAuthLast?.Value?.Response; var LicenseServerSessionId = AuthResult?.SessionId; Console.WriteLine("Auth completed, SessionId = " + (LicenseServerSessionId ?? "null")); Console.WriteLine("\nstarting to set up the sensor and read from memory.\nthe initial measurement takes longer."); var SensorAppManager = new BotEngine.Interface.InterfaceAppManager(); var SensorServerHub = new SimpleSensorServerDispatcher() { SensorAppManager = SensorAppManager, LicenseClient = LicenseClient }; BotEngine.Interface.FromProcessMeasurement <IMemoryMeasurement> MeasurementMemoryReceivedLast = null; while (true) { try { // Limit the frequency of measurements. var RequestedMeasurementTime = (MeasurementMemoryReceivedLast?.Begin + MeasurementTimeDistanceMin) ?? Bib3.Glob.StopwatchZaitMiliSictInt(); // not specifying a subset to read, the sensor will simply read all available (types in MemoryStruct namespace) structures from memory. SensorServerHub.Exchange( Config.EveOnlineClientProcessId, RequestedMeasurementTime, Measurement => { MeasurementMemoryReceivedLast = Measurement; MeasurementReceived(Measurement); }); } finally { Thread.Sleep(250); } } }
static void SampleRun() { Console.WriteLine("this Programm reads the memory of the eve online client process."); Console.WriteLine("start an eve online client and login to your account. Then press any key to continue.\n"); Console.ReadKey(); var Config = Extension.ConfigReadFromConsole(); if (null == Config) { Console.WriteLine("reading config failed."); return; } var LicenseClient = new BotEngine.Interface.LicenseClient() { ServerAddress = Config.LicenseServerAddress, LicenseKey = Config.LicenseKey }; Console.WriteLine(); Console.WriteLine("connecting to " + (LicenseClient?.ServerAddress ?? "") + " using Key \"" + (LicenseClient?.LicenseKey ?? "") + "\" ...."); while (!LicenseClient.AuthCompleted) { LicenseClient.ExchangeAuth(); Thread.Sleep(1111); } var AuthResult = LicenseClient?.ExchangeAuthLast?.Value?.Response; var LicenseServerSessionId = AuthResult?.SessionId; Console.WriteLine("Auth completed, SessionId = " + (LicenseServerSessionId ?? "null")); Console.WriteLine("\nstarting to set up the sensor and read from memory.\nthe initial measurement takes longer."); var SensorAppManager = new BotEngine.Interface.InterfaceAppManager(); var SensorServerHub = new SimpleSensorServerDispatcher() { SensorAppManager = SensorAppManager, LicenseClient = LicenseClient }; BotEngine.Interface.FromProcessMeasurement<IMemoryMeasurement> MeasurementMemoryReceivedLast = null; while (true) { try { // Limit the frequency of measurements. var RequestedMeasurementTime = (MeasurementMemoryReceivedLast?.Begin + MeasurementTimeDistanceMin) ?? Bib3.Glob.StopwatchZaitMiliSictInt(); // not specifying a subset to read, the sensor will simply read all available (types in MemoryStruct namespace) structures from memory. SensorServerHub.Exchange( Config.EveOnlineClientProcessId, RequestedMeasurementTime, Measurement => { MeasurementMemoryReceivedLast = Measurement; MeasurementReceived(Measurement); }); } finally { Thread.Sleep(250); } } }