Exemple #1
0
        public static async Task GetNodeByIdAsync(NodeServiceClient client)
        {
            var res = await client.GetNodeByIdAsync(new GetNodeByIdRequest()
            {
                Id = 1
            });

            Console.WriteLine(res.Node);
        }
Exemple #2
0
        private static async Task sendMetaDataAsync(NodeServiceClient client)
        {
            Metadata md = new Metadata();

            md.Add("username", "moe");
            md.Add("password", "pass");

            try
            {
                await client.GetNodeByIdAsync(new GetNodeByIdRequest(), md);
            }
            catch (Exception ex)
            {
                Console.WriteLine("exception " + ex);
            }
        }