Exemple #1
0
        public void UpdateTrainingExample()
        {
            Console.WriteLine(string.Format("\nCalling UpdateTrainingExample()..."));

            var trainingExample = new TrainingExamplePatch()
            {
                CrossReference = "crossReference",
                Relevance      = 1
            };

            var result = _discovery.UpdateTrainingExample(_existingEnvironmentId, _createdCollectionId, _createdTrainingQueryId, _createdTrainingExampleId, trainingExample);

            if (result != null)
            {
                Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented));
            }
            else
            {
                Console.WriteLine("result is null.");
            }
        }
Exemple #2
0
        public TrainingExample UpdateTrainingExample(string environmentId, string collectionId, string queryId, string exampleId, TrainingExamplePatch body)
        {
            try
            {
                var result = DiscoveryRepository.UpdateTrainingExample(environmentId, collectionId, queryId, exampleId, body);

                return(result);
            }
            catch (Exception ex)
            {
                Logger.Error("DiscoveryService.UpdateTrainingExample failed", this, ex);
            }

            return(null);
        }