Hishop.TransferManager/TransferHelper.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Hishop.TransferManager
{
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.IO;
    using System.Web;
    using System.Xml;

    public static class TransferHelper
    {
        public static byte[] ConvertToBytes(string imageUrl)
        {
            byte[] buffer = new byte[0];
            if (!string.IsNullOrEmpty(imageUrl))
            {
                string path = HttpContext.Current.Request.MapPath("~" + imageUrl);
                if (!File.Exists(path))
                {
                    return buffer;
                }
                try
                {
                    buffer = File.ReadAllBytes(path);
                }
                catch
                {
                }
            }
            return buffer;
        }

        public static Dictionary<string, string> GetExportAdapters(Target source, string exportToName)
        {
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            DataRow[] exporterList = TransferContainer.Instance().GetExporterList(source.Name, exportToName);
            if ((exporterList != null) && (exporterList.Length != 0))
            {
                string str = null;
                int index = 0;
                do
                {
                    Version version = new Version(exporterList[index]["sourceVersion"].ToString());
                    if (version <= source.Version)
                    {
                        str = exporterList[index]["sourceVersion"].ToString();
                    }
                    index++;
                }
                while (string.IsNullOrEmpty(str) && (index < exporterList.Length));
                if (string.IsNullOrEmpty(str))
                {
                    return dictionary;
                }
                foreach (DataRow row in exporterList)
                {
                    if (row["sourceVersion"].ToString().Equals(str))
                    {
                        dictionary.Add(row["fullName"].ToString(), row["exportToName"].ToString() + row["exportToVersion"].ToString());
                    }
后面还有 121 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。