-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathUser.cs
44 lines (40 loc) · 1.41 KB
/
User.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/********************************************************
* *
* Copyright (C) Microsoft. All rights reserved. *
* *
*********************************************************/
using System;
namespace Microsoft.Partner.CSP.Api.V1.Samples
{
class User
{
/// <summary>
/// Read user information from console
/// </summary>
/// <returns>object describing user to be created</returns>
public static dynamic PopulateUserFromConsole()
{
Console.Clear();
Console.ResetColor();
Console.WriteLine("=========================================");
Console.WriteLine("Create New User");
Console.WriteLine("=========================================");
// Taking input from user
Console.WriteLine("Enter a display name for New User:");
string displayName = Console.ReadLine().Trim();
Console.WriteLine("Enter a mail nick name:");
string mailNickname = Console.ReadLine().Trim();
Console.WriteLine("Enter a password:");
string password = Console.ReadLine().Trim();
Console.WriteLine("Enter a userPrincipalName:");
string userPrincipalName = Console.ReadLine().Trim();
return new
{
displayName = displayName,
mailNickname = mailNickname,
userPrincipalName = userPrincipalName,
password = password
};
}
}
}