protected override async Task <Action <AsyncCodeActivityContext> > ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
        {
            // Inputs
            var portaldt          = PortalDT.Get(context);
            var knowledgebase     = Knowledgebase.Get(context);
            var knowledgebasename = KnowledgebaseName.Get(context);

            var JsonObjectUpdateKbOperationDTO = KnowledgebaseUtility.CreateKnowledgebaseUpdate(portaldt, knowledgebase, knowledgebasename);

            // Outputs
            return((ctx) => {
                UpdateKbJson.Set(ctx, JsonObjectUpdateKbOperationDTO);
            });
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var    DataTable905 = new DataTable();
            string kbObject905  = System.IO.File.ReadAllText(@"C:\Dev\WTW\RPA-Knowledgebase\Knowledgebase-Sync\Documents\kbObject905.txt");

            using (var reader = new StreamReader(@"C:\Dev\WTW\RPA-Knowledgebase\Knowledgebase-Sync\Documents\DataTable905.csv"))
                using (var DataTable = new CsvReader(reader, CultureInfo.InvariantCulture))
                {
                    using (var dr = new CsvDataReader(DataTable))
                    {
                        DataTable905.Load(dr);
                    }
                }

            var JsonObjectUpdateKbOperationDTO = KnowledgebaseUtility.CreateKnowledgebaseUpdate(DataTable905, kbObject905, "QA-bcnocg-905");

            Console.WriteLine(JsonObjectUpdateKbOperationDTO);
            Console.WriteLine("Press any key to exit.");
            System.Console.ReadKey();
        }