Target CreateTarget(string tag, string val) { var newTarget = new Target(_conf, _logger); if (tag == "file") { //現在のドキュメンのフルパスからからファイル名を生成する string fullPath = Path.GetDirectoryName(_target.FullPath) + "\\" + val; newTarget.InitFromFile(fullPath); } else if (tag == "virtual") { newTarget.InitFromUri(val); } else if (tag == "comspec") { string fullPath = Path.GetDirectoryName(_target.FullPath) + "\\"; newTarget.InitFromCmd(fullPath); } else { return(null); } return(newTarget); }
Target CreateTarget(string tag, string val) { var newTarget = new Target(_conf, _logger); if (tag == "file") { //現在のドキュメンのフルパスからからファイル名を生成する string fullPath = Path.GetDirectoryName(_target.FullPath) + "\\" + val; newTarget.InitFromFile(fullPath); } else if (tag == "virtual") { newTarget.InitFromUri(val); } else if (tag == "comspec") { string fullPath = Path.GetDirectoryName(_target.FullPath) + "\\"; newTarget.InitFromCmd(fullPath); } else { return null; } return newTarget; }