public RemoteTask <int> SynchronizeTemplatesAsync()
        {
            dynamic rs = CreateReportingService();

            return(RemoteTask.ServerStart <int>(async cts =>
            {
                if (_configuration != null)
                {
                    foreach (KeyValuePair <string, object> sampleData in _configuration.SampleData)
                    {
                        await rs.CreateOrUpdateSampleData(sampleData.Key, JsonConvert.SerializeObject(sampleData.Value, new JsonSerializerSettings()
                        {
                            ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
                            PreserveReferencesHandling = PreserveReferencesHandling.All
                        }));
                    }
                }

                await rs.SynchronizeTemplatesAsync();
                return 0;
            }));
        }
Exemple #2
0
 public RemoteTask <int> EnsureStartedAsync()
 {
     return(RemoteTask.ServerStart(cts => Task.FromResult(0)));
 }
Exemple #3
0
 public RemoteTask <int> StopAsync()
 {
     return(RemoteTask.ServerStart(cts => Task.FromResult(0)));
 }
        public RemoteTask <IEnumerable <string> > GetEnginesAsync()
        {
            dynamic rs = CreateReportingService();

            return(RemoteTask.ServerStart <IEnumerable <string> >(cts => rs.GetEnginesAsync()));
        }