Ejemplo n.º 1
0
        public void Test_valid_desserialization()
        {
            string        error         = string.Empty;
            DynamicDialog dynamicDialog = DynamicDialog.GetFromJson(null, out error);

            Assert.IsNull(dynamicDialog);
            Assert.IsNotNull(error);
            System.Diagnostics.Debug.WriteLine(error);

            // Sending correct json
            string json = GetCorrectJson();

            dynamicDialog = DynamicDialog.GetFromJson(json, out error);
            Assert.IsNotNull(dynamicDialog);
            Assert.IsTrue(string.IsNullOrEmpty(error));
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var    json  = GetCorrectJson();
            string error = "";
            var    df    = DynamicDialog.GetFromJson(json, out error);

            df.ShowDialog();

            Dictionary <string, string> dic = df.GetAllReturnValues();

            if (dic != null)
            {
                foreach (var key in dic.Keys)
                {
                    System.Console.WriteLine("Key [{0}], Value: {1}", key, dic[key]);
                }

                System.Console.Write("Pressione ENTER...");
                System.Console.ReadLine();
            }
        }