Esempio n. 1
0
        internal List <Response> GenerateResponses()
        {
            var maxLevel = Prompts.Max(p => p.Level);

            return(Prompts
                   .Select(p =>
            {
                ServerNetworkProvider.TryResolveDeviceName(p.TargetName, out string ipAddress);
                return new Response(p, ipAddress, p.Level == maxLevel ? ResponseAuth.Op : ResponseAuth.NoOp);
            }).ToList());
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            ServerNetworkProvider networkProvider = new ServerNetworkProvider();
            PromptResponder       responder       = new PromptResponder(networkProvider);

            //TODO: Check threading on these
            networkProvider.Start();
            responder.Start();

            Console.ReadLine();
        }
Esempio n. 3
0
 internal PromptResponder(ServerNetworkProvider network)
 {
     this.network   = network;
     this.jobStatus = new Dictionary <string, Job>();
 }