예제 #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());
        }
예제 #2
0
 public static async Task <User> UserNameAsync()
 {
     return(await RestAPI <User> .RequestAsync("/api/forge/user/profile", true));
 }
예제 #3
0
 public static async Task <bool> IsSessionValid()
 {
     return(await RestAPI <bool> .RequestAsync("/api/forge/session/isvalid", true));
 }