블로그 이미지
SQL Server VS. 석이 minsouk@hotmail.com MSSQL 쿼리성능 관련해 궁금한 사항이 있다면 언제나 누구나 TeamViewer + Line (네이버 japan 메신저) 에 minsouk1 추가 후 연락주세요~ 010-9967-0955 보미아빠

카테고리

보미아빠, 석이 (436)
밥벌이 (16)
싸이클 (1)
일상 (1)
Total192,362
Today5
Yesterday67

달력

« » 2017.10
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

공지사항

qlik sense reload c#

분류없음 / 2016.12.08 18:00

https://community.qlik.com/docs/DOC-8866 

 

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using Qlik.Engine;

namespace qsreload
{
    class Program
    {
        static void Main(string[] args)
        {
            string app = "";
            string url = "ws://localhost";
            bool partial = false;

            foreach (string arg in args)
            {
                Console.WriteLine(arg);
                if (arg.StartsWith("-a="))
                {
                    app = arg.Substring(3);
                }

                if (arg == "-p")
                {
                    partial = true;
                }

                if (arg.StartsWith("-u="))
                {
                    url = arg.Substring(3);
                }
            }

            ILocation location;

            try
            {
                location = Qlik.Engine.Location.FromUri(new Uri(url));
                //location.AsNtlmUserViaProxy(proxyUsesSsl: false);
                location.AsDirectConnectionToPersonalEdition(); 데스크탑인 경우
                IEnumerable<IAppIdentifier> apps = location.GetAppIdentifiers();
                while (true)
                {
                    bool found = false;

                    foreach (var salmon in apps)
                    {
                        if (salmon.AppName == app)
                        {
                            Console.WriteLine("Performing " + (partial ? "PARTIAL " : "") + "reload of " + salmon.AppName + " ");
                            IApp foundApp = location.Hub().OpenApp(salmon.AppId);
                            bool ging = foundApp.DoReload(0, partial);
                            Console.WriteLine("Success: " + ging);
                            foundApp.DoSave();
                            found = true;
                        }
                    }
                    Thread.Sleep(1000 * 1);
               
               
                    if (!found)
                    {
                        Console.WriteLine("App " + app + " could not be found");
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Connection to Qlik Sense Proxy at " + url + " failed");
                Console.WriteLine(ex.GetBaseException());
                Console.ReadKey();
            }
        }
    }
}

저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

최근에 달린 댓글

최근에 받은 트랙백

글 보관함