// process output for login response public override void PrintData(Mandoline.Api.Client.Models.User u) { Console.WriteLine("{0} {1} - Saved selections:", u.FirstName, u.LastName); foreach (ResourceLink <Selection> s in u.SavedSelections) { Console.WriteLine("\t{0}: {1}", s.Name, s.Id); } }
// process login output public override void PrintData(Mandoline.Api.Client.Models.User u, string token) { try { this.ReturnValueStr = token; } catch (NullReferenceException) { this.ReturnValueStr = string.Empty; } }
// process login output public override void PrintData(Mandoline.Api.Client.Models.User u, string token) { // append user info to list, so that we can pass to the DataGridView object var output = new List <Mandoline.Api.Client.Models.User>(); output.Add(u); // pass user list to DataGridView object this.DataGridInstance = output; // hide loading indicator this.StatusLabelVisible = false; // change current user's access token AppConstants.ApiToken = token; }
// process output for login response public override void PrintData(Mandoline.Api.Client.Models.User u) { Console.WriteLine("User has {0} saved selections...", u.SavedSelections.ToList().Count); foreach (ResourceLink <Selection> s in u.SavedSelections) { Console.WriteLine("{0}: {1}", s.Name, s.Id); } // append user info to list, so that we can pass to the DataGridView object var output = new List <Mandoline.Api.Client.Models.User>(); output.Add(u); // pass user list to DataGridView object this.DataGridInstance = output; // hide loading indicator this.StatusLabelVisible = false; }
// process output for single user public override void PrintData(Mandoline.Api.Client.Models.User u) { this.ReturnValueStr = u.ApiKey; }
// process login output public override void PrintData(Mandoline.Api.Client.Models.User u, string token) { Core.AppConstants.ApiToken = token; this.PrintData(u); }
public abstract void PrintData(Mandoline.Api.Client.Models.User u, string token);