23 references to Literal
NativeIntegrations.DockerCompose (23)
ComposeModels.cs (14)
79_render = render ?? ComposeJson.Literal; 91Set("image", value is null ? null : ComposeJson.Literal(value)); 139public void SetLabel(string name, string value) => Model["labels"]!.AsObject()[name] = ComposeJson.Literal(value); 147["type"] = "volume", ["source"] = source, ["target"] = ComposeJson.Literal(target), ["read_only"] = isReadOnly 192var service = new JsonObject { ["image"] = ComposeJson.Literal(image), ["labels"] = new JsonObject() }; 196KeyValuePair.Create(pair.Key, (JsonNode?)JsonValue.Create(ComposeJson.Literal(pair.Value))))); 209volume["driver"] = ComposeJson.Literal(driver); 214KeyValuePair.Create(pair.Key, (JsonNode?)JsonValue.Create(ComposeJson.Literal(pair.Value))))); 218public void AddConfig(string name, string content) => Add("configs", name, new() { ["content"] = ComposeJson.Literal(content) }); 224secret["name"] = ComposeJson.Literal(externalName); 314return new() { ["context"] = Literal(context), ["dockerfile"] = Literal(dockerfile) }; 323var result = new JsonObject { ["test"] = Strings(value.Test.Select(part => escape ? Literal(Text(part, true)) : Text(part, true))) }; 353JsonValue value when value.TryGetValue<string>(out var text) => JsonValue.Create(Literal(text)),
DockerComposeEnvironment.cs (1)
93.Select(part => placeholders.Contains(part) ? part : ComposeJson.Literal(part)));
DockerComposeGenerator.cs (8)
134["image"] = ComposeJson.Literal(image ?? ""), ["labels"] = new JsonObject { ["aspire.resource"] = ComposeJson.Literal(resourceName) } 142service["entrypoint"] = new JsonArray(ComposeJson.Literal(ComposeJson.Text(Text(resource, "entrypoint")))); 264["type"] = kind, ["source"] = source, ["target"] = ComposeJson.Literal(target), ["read_only"] = Boolean(mount, "readOnly") 344return ComposeJson.Literal(Text(value, "value")); 346return ComposeJson.Literal(EndpointValue(value, resources, names)); 354return ComposeJson.Literal(Evaluate(value, resources, names, new Dictionary<string, string>())); 453["name"] = ComposeJson.Literal(ComposeJson.Text(network.GetValue<string>())), ["external"] = true