using System; using System.Collections.Generic; using System.Data.Entity; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using XdCxRhDW.Entity; namespace XdCxRhDW.Repostory { public static class SysConfig { public static SysSetings Config { get; set; } public static DateTime ToUtc(this DateTime time) { return time.AddHours(-Config.ZoneHours); } public static string GetFullUrl(string url) { if (Config == null) return null; if (url.StartsWith("/")) { return $"http://{IpHelper.GetLocalIp()}:{Config.HttpPort}/api{url}"; } else { return $"http://{IpHelper.GetLocalIp()}:{Config.HttpPort}/api/{url}"; } } } }