Esempio n. 1
0
 public static void SetAssetExplorerNodeState(string nodeID, string nodeType, string nodeName, bool expand)
 {
     try
     {
         using (_certonaService = new CertonaServiceClient())
         {
             try
             {
                 UserDTO user    = FormsAuthenticationWrapper.User;
                 var     nodeDTO = new NodeDTO
                 {
                     NodeID       = nodeID,
                     DisplayValue = nodeName,
                     NodeType     = (NodeType)Enum.Parse(typeof(NodeType), nodeType),
                     Expanded     = expand
                 };
                 var assetExplorerNodeStateRequest = new SetAssetExplorerNodeStateRequest
                 {
                     User = user,
                     Node = nodeDTO
                 };
                 _certonaService.SetAssetExplorerNodeState(assetExplorerNodeStateRequest);
             }
             catch (TimeoutException exception)
             {
                 _certonaService.Abort();
                 throw;
             }
             catch (CommunicationException exception)
             {
                 _certonaService.Abort();
                 throw;
             }
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }