public async Task <TypesBatchResponse> CreateNewType(string EnvironmentFqdn, IList <TimeSeriesType> value)
        {
            TimeSeriesInsightsClient tsi   = GetTimeSeriesInsightsClientAsync(EnvironmentFqdn).Result; //all correct
            TypesBatchResponse       types = await tsi.ExecuteTypesBatchOperationAsync(new TypesBatchRequest(put : value));

            return(types);
        }
        private static async Task RunTypesBatchAsync()
        {
            TypesBatchResponse types = await _client.ExecuteTypesBatchOperationAsync(
                new TypesBatchRequest(
                    get : new TypesRequestBatchGetOrDelete(typeIds : new List <Guid?>()
            {
                Guid.Parse("1BE09AF9-F089-4D6B-9F0B-48018B5F7393")
            })));

            PrintResponse(types.Get.First().TimeSeriesType);
        }
示例#3
0
        private static async Task RunTypesBatchAsync()
        {
            TypesBatchResponse types = await _client.TimeSeriesTypes.ExecuteBatchAsync(
                new TypesBatchRequest(
                    get : new TypesRequestBatchGetOrDelete(typeIds : new List <string>()
            {
                "1be09af9-f089-4d6b-9f0b-48018b5f7393"
            })));

            PrintResponse(types.Get.First().TimeSeriesType);
        }
        public async Task <TypesBatchResponse> GetType(string EnvironmentFqdn, string id)
        {
            TimeSeriesInsightsClient tsi   = GetTimeSeriesInsightsClientAsync(EnvironmentFqdn).Result;
            TypesBatchResponse       types = await tsi.ExecuteTypesBatchOperationAsync(
                new TypesBatchRequest(
                    get : new TypesRequestBatchGetOrDelete(typeIds : new List <Guid?>()
            {
                Guid.Parse(id)
            })));

            return(types);
        }