public ActionResult <int> Post([FromBody] Package package) { var factory = new Factory { Script = script, Props = new Dictionary <string, object> { { "client_secret", "){BQ6{h>?-a568OG#))Y-n5V!|[b(^&" }, { "subscription_id", "9a4fe1a5-274e-4c67-8321-8a55ec1ea64d" }, { "client_id", "7ffb12bc-357e-46e5-83e2-7231372561a4" }, { "tenant_id", "bafa704d-560b-4ee8-9563-c265cae5ffe6" }, { "resource_group", "rg3245" }, { "region", "westus2" } }, }; var build = new Build(); using (var context = new CloudformContext()) { var buildEntity = context.Builds.Add(new Build()); context.SaveChanges(); factory.BuildId = buildEntity.Entity.BuildId; } Core.Builder.Build(factory, new EventLogger()); return(new OkObjectResult(factory.BuildId)); }
public void NextLine(int buildId) { using (var context = new CloudformContext()) { context.Builds.Add(new Build { BuildId = buildId, EventId = eventId++, Event = "\n" }); context.SaveChanges(); } }
public void Log(int buildId, string eventDescription) { using (var context = new CloudformContext()) { context.Builds.Add(new Build { BuildId = buildId, EventId = eventId++, Event = eventDescription }); context.SaveChanges(); } }