Exemplo n.º 1
0
        private async static Task <TreeNode[]> GetList(string endpoint)
        {
            IList <TreeNode> nodes = new List <TreeNode>();
            IList <Item>     hubs  = await RestAPI <IList <Item> > .RequestAsync(endpoint, true);

            foreach (Item hub in hubs)
            {
                TreeNode node = new TreeNode(hub.Text);
                node.Tag = hub.ID;
                nodes.Add(node);
            }
            return(nodes.ToArray());
        }
Exemplo n.º 2
0
 public static async Task <User> UserNameAsync()
 {
     return(await RestAPI <User> .RequestAsync("/api/forge/user/profile", true));
 }
Exemplo n.º 3
0
 public static async Task <bool> IsSessionValid()
 {
     return(await RestAPI <bool> .RequestAsync("/api/forge/session/isvalid", true));
 }