コード例 #1
0
        public async Task <AggregationAnalysisResult> GetAggregationAnalysis(Guid jobId, string analyserId, string analysisProperty)
        {
            var analysisPropertyType = await GetAnalyserPropertyResultValue(analyserId, analysisProperty);

            var resultType =
                analysisPropertyType == AnalysisPropertyType.NumberMap ||
                analysisPropertyType == AnalysisPropertyType.StringMap
                    ? AnalysisResultType.MapSum
                    : AnalysisResultType.ListCount;

            var storageRequest = new GetAggregationAnalysisStorageRequest
            {
                JobId       = jobId,
                Type        = AnalysisType.Aggregation,
                ResultType  = resultType,
                ComponentId = analyserId,
                Properties  = new List <AnalysisRequestProperty>
                {
                    new AnalysisRequestProperty
                    {
                        AnalysisPropertyName = analysisProperty,
                        AnalysisPropertyType = analysisPropertyType
                    }
                }
            };

            return(await _storageService.GetAnalysisAggregation(storageRequest));
        }
コード例 #2
0
ファイル: StorageService.cs プロジェクト: Aspect26/socneto
 public async Task <AggregationAnalysisResult> GetAnalysisAggregation(GetAggregationAnalysisStorageRequest getAnalysisRequest)
 {
     return(await _httpService.Post <AggregationAnalysisResult>($"results", getAnalysisRequest));
 }