private static async void Test_NewUserRegistration() { Uri uri = new Uri("fabric:/Phoenix.Microservice.Registration/Phoenix.Manager.Registration.Service"); IRegistrationManager registrationProxy = ServiceProxy.Create <IRegistrationManager>(uri); var user = await registrationProxy.CreateNewUser(Guid.NewGuid(), "Sylvester", "Stallone"); Console.WriteLine($"New user: {user.UserObjectId} {user.FirstName} {user.LastName}"); }
public IEnumerable <string> Get() { // return .ToList(); Uri uri = new Uri("fabric:/Phoenix.Microservice.Registration/Phoenix.Manager.Registration.Service"); IRegistrationManager registrationProxy = ServiceProxy.Create <IRegistrationManager>(uri); var user = registrationProxy.CreateNewUser(Guid.NewGuid(), "Sylvester", "Stallone").Result; var list = HttpContext.User.Claims.Select(claim => string.Concat(claim.Type, " : ", claim.Value)).ToList(); list.Add($"New user: {user.UserObjectId} {user.FirstName} {user.LastName}"); return(list); }