Skip to content

Add UseDoubleQuoteOnArguments to UnParserSettings #371

Open
@lukefan6

Description

@lukefan6

Consider following scenario:

	public class ScaffoldCommand
	{
		[Value(0)]
		public string ConnectionString { get; set; }
                [Value(1)]
		public string Provider { get; set; }
        }

ConnectionString could be a long string that contains spaces and we usually surround them with double quotes so the CLI could recognize it, take entity framework core for example:

dotnet ef dbcontext scaffold "Data Source = xxxxxx;Database = xxxxxx; User ID=xxxxxx; Password=xxxxxx" Microsoft.EntityFrameworkCore.SqlServer

Currently public static string FormatCommandLine<T>(this Parser parser, T options, Action<UnParserSettings> configuration); does not seem to have this kind of capability, I can only generate arguments without double quotes.

I wonder if we could add something like UseDoubleQuoteOnArguments to UnParserSettings so we could configure it to generate arguments surrounded by double quotes.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions