Exemplo n.º 1
0
        public static SharedFolderTree Get(string server)
        {
            if (server == null)
                return new SharedFolderTree();
            else
            {
                SharedFolderTree t = new SharedFolderTree(server);
                t.Refresh();
                return t;

            }
        }
Exemplo n.º 2
0
        public ActionResult GetShares(string server)
        {
            string result = "";

            try
            {
                SharedFolderTree n = new SharedFolderTree(server);
                n.Recursive = false;

                n.Refresh();
                result = "<div class='tree'>" + n.ToUL() + "</div>";
            }
            catch(Exception ex)
            {
                AnvilExceptionCollector ec = new AnvilExceptionCollector(ex);
                result = ec.ToUL();
            }

            return Content(result);
        }