Ejemplo n.º 1
0
        public string GetAbRelativePath(string abPath, ref bool fromNativePath)
        {
            if (null == VersionInfoList)
            {
                ParseVersionList();
            }
            if (null == VersionInfoList)
            {
                return(null);
            }

            string abRelativePath = "";

            abPath = abPath.ToLower();

            List <string> abVerInfo = null;

            VersionInfoList.TryGetValue(abPath, out abVerInfo);
            if (null != abVerInfo)
            {
                int id = int.Parse(abVerInfo[1]);
                fromNativePath = id <= ABVersion.OriginalVersionId.Id3rd;
                if (fromNativePath)
                {
                    abRelativePath = ABVersion.OriginalVersionInfo.NativeInfoList.Contains(abVerInfo[3]) ? abVerInfo[3] : null;
                }
                else
                {
                    abRelativePath = string.Format("{0}/{1}", abVerInfo[1], abVerInfo[3]);
                }
            }
            return(abRelativePath);
        }
Ejemplo n.º 2
0
        public string GetAbRelativePath(string abPath)
        {
            if (null == VersionInfoList)
            {
                VersionInfoList = ABHelper.ReadVersionFile(VersionFilePath);
            }

            string abRelativePath = "";

            abPath = abPath.ToLower();

            List <string> abVerInfo = null;

            VersionInfoList.TryGetValue(abPath, out abVerInfo);
            if (null != abVerInfo && int.Parse(abVerInfo[1]) > ABVersion.OriginalVersionId.Id3rd)
            {
                abRelativePath = string.Format("{0}/{1}", abVerInfo[1], abVerInfo[3]);
            }
            return(abRelativePath);
        }