@@ -43,6 +43,7 @@ static void Main(string[] args)
4343 {
4444 serverURL = new Uri ( options . server ) ;
4545 appname = options . appname ;
46+ appid = options . appid ;
4647 virtualProxy = ! string . IsNullOrEmpty ( options . virtualProxy ) ? options . virtualProxy : "" ;
4748 openSheets = options . fetchobjects ;
4849 if ( options . selectionfield != null )
@@ -73,19 +74,32 @@ static void Main(string[] args)
7374
7475
7576 ////Start to cache the apps
76- if ( appname != null )
77+
78+ if ( appid != null )
7779 {
78- //Open up and cache one app
79- IAppIdentifier appidentifier = remoteQlikSenseLocation . AppWithNameOrDefault ( appname ) ;
80+ //Open up and cache one app, based on app ID
81+ IAppIdentifier appidentifier = remoteQlikSenseLocation . AppWithId ( appid ) ;
8082
8183 LoadCache ( remoteQlikSenseLocation , appidentifier , openSheets , mySelection ) ;
84+
8285 }
8386 else
8487 {
85- //Get all apps, open them up and cache them
86- remoteQlikSenseLocation . GetAppIdentifiers ( ) . ToList ( ) . ForEach ( id => LoadCache ( remoteQlikSenseLocation , id , openSheets , null ) ) ;
88+ if ( appname != null )
89+ {
90+ //Open up and cache one app
91+ IAppIdentifier appidentifier = remoteQlikSenseLocation . AppWithNameOrDefault ( appname ) ;
92+
93+ LoadCache ( remoteQlikSenseLocation , appidentifier , openSheets , mySelection ) ;
94+ }
95+ else
96+ {
97+ //Get all apps, open them up and cache them
98+ remoteQlikSenseLocation . GetAppIdentifiers ( ) . ToList ( ) . ForEach ( id => LoadCache ( remoteQlikSenseLocation , id , openSheets , null ) ) ;
99+ }
87100 }
88101
102+
89103 ////Wrap it up
90104 var dt = DateTime . Now - d ;
91105 Print ( "Cache initialization complete. Total time: {0}" , dt . ToString ( ) ) ;
0 commit comments