private async static Task <bool> deleteAgent(Session session, string agent_username) { ImplAgent implAgent = new ImplAgent(session); try { await implAgent.deleteAgent(agent_username); } catch (Exception e) { Console.WriteLine(e); } return(true); }
private async static Task <Agent> getAgent(Session session, String agent_username) { ImplAgent implAgent = new ImplAgent(session); Agent agent = null;; try { agent = await implAgent.getAgent(agent_username); Console.Write("Returned Agent : " + agent.Username + "\n"); } catch (Exception e) { Console.WriteLine(e); } return(agent); }
private async static Task <Agent> createAgent(Session session, string agent_username, string agent_password, string firstName, string lastName, string startDate, string endDate) { ImplAgent implAgent = new ImplAgent(session); Agent agent = null;; try { agent = await implAgent.createAgent(agent_username, agent_password, firstName, lastName, startDate, endDate); Console.Write("Created Agent : " + agent.Username + "\n"); } catch (Exception e) { Console.WriteLine(e); } return(agent); }