コード例 #1
0
ファイル: XMLToModel.cs プロジェクト: johnmbaughman/Locult
        /// <summary>
        /// Visit a file reference model object with the given cursor in <paramref name="cursorParams"/>.
        /// </summary>
        /// <param name="modelSolution"></param>
        /// <param name="cursorParams"></param>
        void IVisitor.Visit(FileReference modelSolution, object cursorParams)
        {
            var par = cursorParams as XMLParams;
            var fileReferennceTAG = par.CurrentItem as FILE_TAG;
            var sourceFilePath    = fileReferennceTAG.Path;

            if (par.SolutionPathName != null)         // Comvert to absolute path
            {
                string path = System.IO.Path.Combine(par.SolutionPathName, sourceFilePath);
                sourceFilePath = System.IO.Path.GetFullPath(path);
            }

            modelSolution.SetPath(sourceFilePath);
            modelSolution.SetType(fileReferennceTAG.Type);
            modelSolution.SetComment(fileReferennceTAG.Comment);
        }