コード例 #1
0
        public static List <NodeDTO> GetAssetTreeItems()
        {
            var nodes = new List <NodeDTO>();

            try
            {
                using (_certonaService = new CertonaServiceClient())
                {
                    try
                    {
                        var user = FormsAuthenticationWrapper.User;
                        var assetExplorerTreeRequest = new GetAssetExplorerTreeRequest {
                            User = user
                        };
                        var assetExplorerTreeResponse = _certonaService.GetAssetExplorerTree(assetExplorerTreeRequest);

                        return(assetExplorerTreeResponse.Nodes.ToList());
                    }
                    catch (TimeoutException exception)
                    {
                        _certonaService.Abort();
                    }
                    catch (CommunicationException exception)
                    {
                        _certonaService.Abort();
                    }
                }
            }
            catch (Exception ex)
            {
            }
            return(nodes);
        }