public void can_deserialize_and_work_with_dynamic()
        {
            var parameters = new ExpandoObject();
            ((IDictionary<string, object>)parameters)["Test"] = "test value";

            var json = JsonConvert.SerializeObject(parameters);
            dynamic deserialized = JsonConvert.DeserializeObject<IDictionary<string, object>>(json);

            var expando = new ParameterValues(parameters);
            ((string) expando.GetValue("Test")).ShouldBe("test value");

            var fromJson = new ParameterValues(deserialized);
            ((string)fromJson.GetValue("Test")).ShouldBe("test value");
        }
예제 #2
0
 public override AsimovTask GetDeployTask(AsimovVersion version, ParameterValues parameterValues)
 {
     var task = new DeployTask(this, version, parameterValues);
     task.AddDeployStep<FileCopyDeployStep>();
     return task;
 }
 public override AsimovTask GetDeployTask(AsimovVersion version, ParameterValues parameterValues)
 {
     var task = new DeployTask(this, version, parameterValues);
     task.AddDeployStep<UpdateWindowsService>();
     return task;
 }
예제 #4
0
 public abstract AsimovTask GetDeployTask(AsimovVersion version, ParameterValues parameterValues);