Example #1
0
        Load(System.Int64 RID)
        {
            var result = new LG.Data.Models.Identity.Graph.AuthGraphEntity();
            var client = LG.Services.ClientConnection.GetConnection();

            try
            {
                client.Open();
                var response = await client.GetAuthGraphForUserAsync(
                    new LG.Services.UMS.GetAuthGraphForUserRequest()
                {
                    MessageGuid = Guid.NewGuid(),
                    UserRID     = RID
                });

                result.AuthGraph = response.AuthGraph;
            }
            catch (Exception exception)
            {
                client.Abort();
                result.IsError = true;
                result.Message = exception.Message; client.Abort();
            }
            finally
            {
                if (client.State != System.ServiceModel.CommunicationState.Closed)
                {
                    client.Close();
                }
            }
            return(result);
        }
Example #2
0
     Load(System.Int64 RID)
 {
     var result = new LG.Data.Models.Identity.Graph.AuthGraphEntity();
     var client = LG.Services.ClientConnection.GetConnection();
     try
     {
         client.Open();
         var response =await client.GetAuthGraphForUserAsync(
             new LG.Services.UMS.GetAuthGraphForUserRequest()
             {
                 MessageGuid = Guid.NewGuid(),
                 UserRID = RID
             });
         result.AuthGraph = response.AuthGraph;
     }
     catch (Exception exception)
     {
         client.Abort();
         result.IsError = true;
         result.Message = exception.Message; client.Abort();
     }
     finally
     {
         if (client.State != System.ServiceModel.CommunicationState.Closed)
         {
             client.Close();
         }
     }
     return result;
 }