B2CGraphShell.B2CGraphClient.UpdateUser C# (CSharp) Метод

UpdateUser() публичный Метод

public UpdateUser ( string objectId, string json ) : Task
objectId string
json string
Результат Task
        public async Task<string> UpdateUser(string objectId, string json)
        {
            return await SendGraphPatchRequest("/users/" + objectId, json);
        }

Usage Example

Пример #1
0
        private static void UpdateUser(string[] args)
        {
            if (args.Length <= 2)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Please include an objectId and a path to a .json file.  Run B2CGraphShell Syntax to see examples.");
                Console.ForegroundColor = init;
                return;
            }

            string json      = File.ReadAllText(args[2]);
            object formatted = JsonConvert.DeserializeObject(client.UpdateUser(args[1], json).Result);

            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine(JsonConvert.SerializeObject(formatted, Formatting.Indented));
        }