Ejemplo n.º 1
0
 internal static QueryResult <T> ToInternalType <T>(
     this Graph.Common.QueryResult value,
     Func <Graph.Common.NeuronResult, T> itemsSelector) where T : class
 {
     return(new QueryResult <T>()
     {
         Count = value.Count,
         Items = value.Neurons.Select(n => itemsSelector(n))
     });
 }
Ejemplo n.º 2
0
        private static async Task <QueryResult <Terminal> > ConvertProcessValidate(
            Graph.Common.QueryResult commonResult,
            string userId,
            IValidationClient validationClient,
            ISettingsService settingsService,
            CancellationToken token
            )
        {
            var result = commonResult.ToInternalType(n => n.Terminal.ToInternalType());

            result.Items = await result.Items.ProcessValidate(
                userId,
                validationClient,
                settingsService,
                token
                );

            return(result);
        }