public ConvertorArgs(string[] args)
		{
			_args = args;
			var accountName = new CmdLineString("acc", false,
			                                    "Target Process Account Name. Converted Profile will be created for this account.");

			var cmdLine = new ConsoleCmdLine();
			cmdLine.RegisterParameter(accountName);

			var tpConnection = new CmdLineString("tpdb", true, "Plugin database connection string.");
			cmdLine.RegisterParameter(tpConnection);

			var pluginConnection = new CmdLineString("plugindb", false, "Target Process database connection string.");
			cmdLine.RegisterParameter(pluginConnection);

			var action = new CmdLineString("action", false, "Migration action");
			cmdLine.RegisterParameter(action);

			cmdLine.Parse(args);

			TpConnectionString = tpConnection;
			AccountName = string.IsNullOrEmpty(accountName) ? Integration.Messages.AccountName.Empty.Value : accountName;

			PluginConnectionString = string.IsNullOrEmpty(pluginConnection) ? TpConnectionString : pluginConnection;

			Action = string.IsNullOrEmpty(action) ? DefaultAction : action;
		}
Esempio n. 2
0
        public ConvertorArgs(string[] args)
        {
            _args = args;
            var accountName = new CmdLineString("acc", false,
                                                "Target Process Account Name. Converted Profile will be created for this account.");

            var cmdLine = new ConsoleCmdLine();

            cmdLine.RegisterParameter(accountName);

            var tpConnection = new CmdLineString("tpdb", true, "Plugin database connection string.");

            cmdLine.RegisterParameter(tpConnection);

            var pluginConnection = new CmdLineString("plugindb", false, "Target Process database connection string.");

            cmdLine.RegisterParameter(pluginConnection);

            var action = new CmdLineString("action", false, "Migration action");

            cmdLine.RegisterParameter(action);

            cmdLine.Parse(args);

            TpConnectionString = tpConnection;
            AccountName        = string.IsNullOrEmpty(accountName) ? Integration.Messages.AccountName.Empty.Value : accountName;

            PluginConnectionString = string.IsNullOrEmpty(pluginConnection) ? TpConnectionString : pluginConnection;

            Action = string.IsNullOrEmpty(action) ? DefaultAction : action;
        }