コード例 #1
0
ファイル: Ssi.cs プロジェクト: schifflee/bjd5
        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);
        }
コード例 #2
0
ファイル: Ssi.cs プロジェクト: jsakamoto/bjd5
 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;
 }