Exemplo n.º 1
0
        private static async Task RunInstancesBatchAsync()
        {
            InstancesBatchResponse instances = await _client.ExecuteInstancesBatchOperationAsync(
                new InstancesBatchRequest(get : new IList <object>[] { TimeSeriesId }));

            PrintResponse(instances.Get.First().Instance);
        }
Exemplo n.º 2
0
        public async Task <InstancesBatchResponse> CreateNewInstance(string EnvironmentFqdn, IList <TimeSeriesInstance> Instance)
        {
            TimeSeriesInsightsClient tsi       = GetTimeSeriesInsightsClientAsync(EnvironmentFqdn).Result;
            InstancesBatchResponse   instances = await tsi.ExecuteInstancesBatchOperationAsync(
                new InstancesBatchRequest(put : Instance));

            return(instances);
        }
Exemplo n.º 3
0
        public async Task <InstancesBatchResponse> DeleteInstance(string EnvironmentFqdn, object[] id)
        {
            TimeSeriesInsightsClient tsi = GetTimeSeriesInsightsClientAsync(EnvironmentFqdn).Result;

            InstancesBatchResponse instances = await tsi.ExecuteInstancesBatchOperationAsync(
                new InstancesBatchRequest(delete : new IList <object>[] { id }));

            return(instances);
        }
Exemplo n.º 4
0
        public async Task <InstancesBatchResponse> GetInstance(string EnvironmentFqdn, string TimeSeriesId)
        {
            TimeSeriesInsightsClient tsi = GetTimeSeriesInsightsClientAsync(EnvironmentFqdn).Result;

            object[] TimeSeriesIdValue       = new object[] { TimeSeriesId };
            InstancesBatchResponse instances = await tsi.ExecuteInstancesBatchOperationAsync(
                new InstancesBatchRequest(get : new IList <object>[] { TimeSeriesIdValue }));

            return(instances);
        }