public static DockerComposeCommonFlags SetOrClear(this DockerComposeCommonFlags current, DockerComposeCommonFlags value, bool add) { if (add) { return(current | value); } else { return(current & ~value); } }
public static IEnumerable <string> OptionsToString(this DockerComposeCommonFlags value, OptionPreference preferLongNames = OptionPreference.Short) { // generator : SingleTaskEnumsGenerator // --verbose: Show more output if ((value & DockerComposeCommonFlags.Verbose) != 0) { yield return("--verbose"); } // --no-ansi: Do not print ANSI control characters if ((value & DockerComposeCommonFlags.NoAnsi) != 0) { yield return("--no-ansi"); } // -v, --version: Print version and exit if ((value & DockerComposeCommonFlags.Version) != 0) { yield return(preferLongNames == OptionPreference.Long ? "--version" : "-v"); } // --tls: Use TLS; implied by --tlsverify if ((value & DockerComposeCommonFlags.Tls) != 0) { yield return("--tls"); } // --tlsverify: Use TLS and verify the remote if ((value & DockerComposeCommonFlags.Tlsverify) != 0) { yield return("--tlsverify"); } // --skip-hostname-check: Don't check the daemon's hostname against the name specified in the client certificate if ((value & DockerComposeCommonFlags.SkipHostnameCheck) != 0) { yield return("--skip-hostname-check"); } // --compatibility: If set, Compose will attempt to convert deploy keys in v3 files to their non-Swarm equivalent if ((value & DockerComposeCommonFlags.Compatibility) != 0) { yield return("--compatibility"); } }