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

public CreateUser ( string json ) : Task
json string
Результат Task
Пример #1
0
        private static void CreateUser()
        {
            string path = ConfigurationManager.AppSettings["CreateUserFilePath"];

            string json      = File.ReadAllText(path);
            object formatted = JsonConvert.DeserializeObject(client.CreateUser(json).Result);
        }
Пример #2
0
        private static void CreateUser(string[] args)
        {
            if (args.Length <= 1)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Please include a path to a .json file.  Run B2CGraphShell Syntax to see examples.");
                Console.ForegroundColor = init;
                return;
            }

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

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