NewLife/X

完全去除__MOBILE__,由std支持
大石头 编写于 2018-12-22 15:23:32
共计: 修改22个文件,增加23行、删除197行。
修改 +1 -1
修改 +1 -1
修改 +1 -3
修改 +0 -49
修改 +0 -2
修改 +0 -16
修改 +0 -4
修改 +0 -25
修改 +0 -2
修改 +0 -8
修改 +1 -3
修改 +3 -24
修改 +3 -21
修改 +0 -4
修改 +0 -2
修改 +0 -7
修改 +5 -9
修改 +0 -2
修改 +1 -7
修改 +0 -2
修改 +6 -2
修改 +1 -3
修改 +1 -1
diff --git a/NewLife.Core/Agent/AgentServiceBase_Base.cs b/NewLife.Core/Agent/AgentServiceBase_Base.cs
index 096fbc8..64b9ae7 100644
--- a/NewLife.Core/Agent/AgentServiceBase_Base.cs
+++ b/NewLife.Core/Agent/AgentServiceBase_Base.cs
@@ -54,7 +54,7 @@ namespace NewLife.Agent
                         {
                             // 这里实例化一次,按理应该可以除非AgentServiceBase<TService>的类型构造函数了,如果还是没有赋值,则这里赋值
                             var obj = item.CreateInstance();
-                            if ((last == null || last is AgentService) && obj != null && obj is AgentServiceBase)
+                            if ((last == null /*|| last is AgentService*/) && obj != null && obj is AgentServiceBase)
                             {
                                 last = obj as AgentServiceBase;
                             }
修改 +1 -1
diff --git a/NewLife.Core/Common/Runtime.cs b/NewLife.Core/Common/Runtime.cs
index c41b540..f765a1c 100644
--- a/NewLife.Core/Common/Runtime.cs
+++ b/NewLife.Core/Common/Runtime.cs
@@ -31,7 +31,7 @@ namespace NewLife
         #endregion
 
         #region Web环境
-#if __MOBILE__ || __CORE__
+#if __CORE__
         /// <summary>是否Web环境</summary>
         public static Boolean IsWeb => false;
 #else
修改 +1 -3
diff --git a/NewLife.Core/Extension/StringHelper.cs b/NewLife.Core/Extension/StringHelper.cs
index 0e4f6b9..4565799 100644
--- a/NewLife.Core/Extension/StringHelper.cs
+++ b/NewLife.Core/Extension/StringHelper.cs
@@ -877,9 +877,7 @@ namespace System
         #endregion
 
         #region 文字转语音
-#if __MOBILE__
-#elif __CORE__
-#else
+#if !__CORE__
         private static NewLife.Extension.SpeakProvider _provider;
         //private static System.Speech.Synthesis.SpeechSynthesizer _provider;
         static void Init()
修改 +0 -49
diff --git a/NewLife.Core/IO/PathHelper.cs b/NewLife.Core/IO/PathHelper.cs
index 4fefe09..0f14187 100644
--- a/NewLife.Core/IO/PathHelper.cs
+++ b/NewLife.Core/IO/PathHelper.cs
@@ -1,10 +1,8 @@
 using System.Collections.Generic;
 using System.Text;
 using NewLife.IO;
-#if !__MOBILE__
 using System.IO.Compression;
 using NewLife.Compression;
-#endif
 
 namespace System.IO
 {
@@ -298,7 +296,6 @@ namespace System.IO
             }
         }
 
-#if !__MOBILE__ && !NET4
         /// <summary>解压缩</summary>
         /// <param name="fi"></param>
         /// <param name="destDir"></param>
@@ -369,46 +366,6 @@ namespace System.IO
                 new SevenZip().Compress(fi.FullName, destFile);
             }
         }
-#elif !__MOBILE__
-        /// <summary>解压缩</summary>
-        /// <param name="fi"></param>
-        /// <param name="destDir"></param>
-        /// <param name="overwrite">是否覆盖目标同名文件</param>
-        public static void Extract(this FileInfo fi, String destDir, Boolean overwrite = false)
-        {
-            if (destDir.IsNullOrEmpty()) destDir = fi.Name.GetFullPath();
-
-            //ZipFile.ExtractToDirectory(fi.FullName, destDir);
-
-            if (fi.Name.EndsWithIgnoreCase(".zip"))
-            {
-                ZipFile.ExtractToDirectory(fi.FullName, destDir, overwrite, false);
-            }
-            else
-            {
-                new SevenZip().Extract(fi.FullName, destDir);
-            }
-        }
-
-        /// <summary>压缩文件</summary>
-        /// <param name="fi"></param>
-        /// <param name="destFile"></param>
-        public static void Compress(this FileInfo fi, String destFile)
-        {
-            if (destFile.IsNullOrEmpty()) destFile = fi.Name + ".zip";
-
-            if (File.Exists(destFile)) File.Delete(destFile);
-
-            if (destFile.EndsWithIgnoreCase(".zip"))
-            {
-                ZipFile.CompressFile(fi.FullName, destFile);
-            }
-            else
-            {
-                new SevenZip().Compress(fi.FullName, destFile);
-            }
-        }
-#endif
         #endregion
 
         #region 目录扩展
@@ -532,7 +489,6 @@ namespace System.IO
             return list.ToArray();
         }
 
-#if !__MOBILE__
         /// <summary>压缩</summary>
         /// <param name="di"></param>
         /// <param name="destFile"></param>
@@ -542,16 +498,11 @@ namespace System.IO
 
             if (File.Exists(destFile)) File.Delete(destFile);
 
-#if !NET4
             if (destFile.EndsWithIgnoreCase(".zip"))
                 ZipFile.CreateFromDirectory(di.FullName, destFile, CompressionLevel.Optimal, true);
             else
                 new SevenZip().Compress(di.FullName, destFile);
-#else
-            new SevenZip().Compress(di.FullName, destFile);
-#endif
         }
-#endif
         #endregion
     }
 }
\ No newline at end of file
修改 +0 -2
diff --git a/NewLife.Core/Json/JsonConfig.cs b/NewLife.Core/Json/JsonConfig.cs
index 94018c1..caddeb0 100644
--- a/NewLife.Core/Json/JsonConfig.cs
+++ b/NewLife.Core/Json/JsonConfig.cs
@@ -112,10 +112,8 @@ namespace NewLife.Json
                 {
                     // 这里不能着急,派生类可能通过静态构造函数指定配置文件路径
                     //throw new XException("编码错误!请为配置类{0}设置{1}特性,指定配置文件!", typeof(TConfig), typeof(XmlConfigFileAttribute).Name);
-#if !__MOBILE__
                     _.ConfigFile = "ViewConfig\\{0}.json".F(typeof(TConfig).Name);
                     _.ReloadTime = 10000;
-#endif
                 }
                 else
                 {
修改 +0 -16
diff --git a/NewLife.Core/Log/CodeTimer.cs b/NewLife.Core/Log/CodeTimer.cs
index 13f6a7d..a95d35e 100644
--- a/NewLife.Core/Log/CodeTimer.cs
+++ b/NewLife.Core/Log/CodeTimer.cs
@@ -48,23 +48,17 @@ namespace NewLife.Log
                 Action = action,
                 ShowProgress = true
             };
-#if !__MOBILE__
             var currentForeColor = Console.ForegroundColor;
             Console.ForegroundColor = ConsoleColor.Yellow;
             var left = Console.CursorLeft;
-#endif
             if (needTimeOne) timer.TimeOne();
             timer.Time();
 
             // 等一会,让进度那边先输出
             Thread.Sleep(10);
-#if !__MOBILE__
             Console.CursorLeft = left;
-#endif
             Console.WriteLine(timer.ToString());
-#if !__MOBILE__
             Console.ForegroundColor = currentForeColor;
-#endif
 
             return timer;
         }
@@ -75,10 +69,8 @@ namespace NewLife.Log
         {
             Write(title, 16);
             Console.Write(":");
-#if !__MOBILE__
             var currentForeColor = Console.ForegroundColor;
             Console.ForegroundColor = ConsoleColor.Yellow;
-#endif
             Write("执行时间", 9);
             Console.Write(" ");
             Write("CPU时间", 9);
@@ -88,9 +80,7 @@ namespace NewLife.Log
             Console.WriteLine("   百分比");
 
             msBase = 0;
-#if !__MOBILE__
             Console.ForegroundColor = currentForeColor;
-#endif
         }
 
         static void Write(String name, Int32 max)
@@ -316,13 +306,11 @@ namespace NewLife.Log
 
         void Progress(Object state)
         {
-#if !__MOBILE__
             var left = Console.CursorLeft;
 
             // 设置光标不可见
             var cursorVisible = Console.CursorVisible;
             Console.CursorVisible = false;
-#endif
             var sw = Stopwatch.StartNew();
             while (true)
             {
@@ -343,9 +331,7 @@ namespace NewLife.Log
                         var cost = ms / i;
 
                         Console.Write($"{ms,7:n0}ms {prog:p2} Total=>{ts}");
-#if !__MOBILE__
                         Console.CursorLeft = left;
-#endif
                     }
                 }
                 catch (ThreadAbortException) { break; }
@@ -354,10 +340,8 @@ namespace NewLife.Log
                 Thread.Sleep(500);
             }
             sw.Stop();
-#if !__MOBILE__
             Console.CursorLeft = left;
             Console.CursorVisible = cursorVisible;
-#endif
         }
         #endregion
 
修改 +0 -4
diff --git a/NewLife.Core/Log/ConsoleLog.cs b/NewLife.Core/Log/ConsoleLog.cs
index ba22719..8cb0859 100644
--- a/NewLife.Core/Log/ConsoleLog.cs
+++ b/NewLife.Core/Log/ConsoleLog.cs
@@ -25,7 +25,6 @@ namespace NewLife.Log
 
             lock (this)
             {
-#if !__MOBILE__
                 var cc = Console.ForegroundColor;
                 switch (level)
                 {
@@ -43,11 +42,8 @@ namespace NewLife.Log
 
                 var old = Console.ForegroundColor;
                 Console.ForegroundColor = cc;
-#endif
                 ConsoleWriteLog(e);
-#if !__MOBILE__
                 Console.ForegroundColor = old;
-#endif
             }
         }
 
修改 +0 -25
diff --git a/NewLife.Core/Log/Logger.cs b/NewLife.Core/Log/Logger.cs
index c22d614..56391e0 100644
--- a/NewLife.Core/Log/Logger.cs
+++ b/NewLife.Core/Log/Logger.cs
@@ -4,9 +4,6 @@ using System.IO;
 using System.Reflection;
 using System.Runtime;
 using System.Text;
-#if __ANDROID__
-using Android.OS;     
-#endif
 
 namespace NewLife.Log
 {
@@ -170,14 +167,12 @@ namespace NewLife.Log
             sb.AppendFormat("#AppDomain: {0}\r\n", AppDomain.CurrentDomain.FriendlyName);
 
             var fileName = String.Empty;
-#if !__MOBILE__
             // MonoAndroid无法识别MainModule,致命异常
             try
             {
                 fileName = process.MainModule.FileName;
             }
             catch { }
-#endif
             if (fileName.IsNullOrEmpty() || !fileName.EndsWithIgnoreCase("dotnet", "dotnet.exe"))
             {
                 try
@@ -205,15 +200,6 @@ namespace NewLife.Log
                 sb.AppendFormat("#CommandLine: {0}\r\n", line);
 
             var apptype = "";
-#if __MOBILE__
-#if __ANDROID__
-            apptype = "Android";
-#elif __IOS__
-            apptype = "iOS";
-#else
-            apptype = "Mobile";
-#endif
-#else
             if (Runtime.IsWeb)
                 apptype = "Web";
             else if (!Environment.UserInteractive)
@@ -222,20 +208,10 @@ namespace NewLife.Log
                 apptype = "Console";
             else
                 apptype = "WinForm";
-#endif
 
             sb.AppendFormat("#ApplicationType: {0}\r\n", apptype);
             sb.AppendFormat("#CLR: {0}, {1}\r\n", Environment.Version, ver);
 
-#if __MOBILE__
-#if __ANDROID__
-            sb.AppendFormat("#OS: {0}, {1}/{2}\r\n", Build.Fingerprint, Build.Host, Build.Model);
-#elif __IOS__
-            sb.AppendFormat("#OS: {0}, {1}/{2}\r\n", "iOS", "", "");
-#else
-            sb.AppendFormat("#OS: {0}, {1}/{2}\r\n", "Mobile", "", "");
-#endif
-#else
             var os = Environment.OSVersion + "";
             if (Runtime.Linux)
             {
@@ -254,7 +230,6 @@ namespace NewLife.Log
             }
 
             sb.AppendFormat("#OS: {0}, {1}/{2}\r\n", os, Environment.MachineName, Environment.UserName);
-#endif
             sb.AppendFormat("#CPU: {0}\r\n", System.Environment.ProcessorCount);
             sb.AppendFormat("#GC: IsServerGC={0}, LatencyMode={1}\r\n", GCSettings.IsServerGC, GCSettings.LatencyMode);
 
修改 +0 -2
diff --git a/NewLife.Core/Log/TextControlLog.cs b/NewLife.Core/Log/TextControlLog.cs
index d0500e7..5fc4066 100644
--- a/NewLife.Core/Log/TextControlLog.cs
+++ b/NewLife.Core/Log/TextControlLog.cs
@@ -23,7 +23,6 @@ namespace NewLife.Log
             WriteLog(Control, Format(format, args) + Environment.NewLine, MaxLines);
         }
 
-#if !__MOBILE__
         /// <summary>在WinForm控件上输出日志,主要考虑非UI线程操作</summary>
         /// <remarks>不是常用功能,为了避免干扰常用功能,保持UseWinForm开头</remarks>
         /// <param name="control">要绑定日志输出的WinForm控件</param>
@@ -38,6 +37,5 @@ namespace NewLife.Log
 
             txt.Append(msg, maxLines);
         }
-#endif
     }
 }
\ No newline at end of file
修改 +0 -8
diff --git a/NewLife.Core/Log/TraceStream.cs b/NewLife.Core/Log/TraceStream.cs
index da8b072..e9dca6d 100644
--- a/NewLife.Core/Log/TraceStream.cs
+++ b/NewLife.Core/Log/TraceStream.cs
@@ -278,20 +278,16 @@ namespace NewLife.Log
 
         void TraceStream_OnAction(Object sender, EventArgs<String, Object[]> e)
         {
-#if !__MOBILE__
             var color = Console.ForegroundColor;
 
             // 红色动作
             Console.ForegroundColor = ConsoleColor.Red;
-#endif
             var act = e.Arg1;
             if (act.Length < 8) act += "\t";
             Console.Write(act);
 
-#if !__MOBILE__
             // 白色十六进制
             Console.ForegroundColor = ConsoleColor.White;
-#endif
             Console.Write("\t");
 
             Byte[] buffer = null;
@@ -327,10 +323,8 @@ namespace NewLife.Log
                 else
                     Console.Write(BitConverter.ToString(buffer, offset, count <= 50 ? count : 50) + (count <= 50 ? "" : "...(共" + count + ")"));
             }
-#if !__MOBILE__
             // 黄色内容
             Console.ForegroundColor = ConsoleColor.Yellow;
-#endif
             Console.Write("\t");
             if (e.Arg2.Length == 1)
             {
@@ -354,9 +348,7 @@ namespace NewLife.Log
                 else if (count < 50)
                     Console.Write(Encoding.GetString(buffer, offset, count));
             }
-#if !__MOBILE__
             Console.ForegroundColor = color;
-#endif
             Console.WriteLine();
         }
 
修改 +1 -3
diff --git a/NewLife.Core/Log/WriteLogEventArgs.cs b/NewLife.Core/Log/WriteLogEventArgs.cs
index 107e9aa..4fbdda6 100644
--- a/NewLife.Core/Log/WriteLogEventArgs.cs
+++ b/NewLife.Core/Log/WriteLogEventArgs.cs
@@ -88,9 +88,7 @@ namespace NewLife.Log
             var tid = Task.CurrentId;
             TaskID = tid != null ? tid.Value : -1;
 
-#if __MOBILE__
-#elif __CORE__
-#else
+#if !__CORE__
             IsWeb = System.Web.HttpContext.Current != null;
 #endif
         }
修改 +3 -24
diff --git a/NewLife.Core/Log/XTrace.cs b/NewLife.Core/Log/XTrace.cs
index 03a02e7..6665b11 100644
--- a/NewLife.Core/Log/XTrace.cs
+++ b/NewLife.Core/Log/XTrace.cs
@@ -5,9 +5,7 @@ using System.Runtime.Versioning;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
-#if __MOBILE__
-#elif __CORE__
-#else
+#if !__CORE__
 using System.Windows.Forms;
 #endif
 using NewLife.Reflection;
@@ -70,8 +68,7 @@ namespace NewLife.Log
         #region 构造
         static XTrace()
         {
-#if __CORE__
-#else
+#if !__CORE__
             AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
 #endif
             TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
@@ -79,18 +76,6 @@ namespace NewLife.Log
             ThreadPoolX.Init();
         }
 
-#if __MOBILE__
-        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
-        {
-            var msg = "" + e.ExceptionObject;
-            WriteLine(msg);
-            if (e.IsTerminating)
-            {
-                Log.Fatal("异常退出!");
-            }
-        }
-#endif
-
         private static void TaskScheduler_UnobservedTaskException(Object sender, UnobservedTaskExceptionEventArgs e)
         {
             if (!e.Observed)
@@ -130,11 +115,7 @@ namespace NewLife.Log
                 if (_Log != null) return true;
 
                 _initing = Thread.CurrentThread.ManagedThreadId;
-#if !__MOBILE__
                 _Log = TextFileLog.Create(LogPath);
-#else
-                _Log = new NetworkLog();
-#endif
 
                 var set = Setting.Current;
                 if (!set.NetworkLog.IsNullOrEmpty())
@@ -181,9 +162,7 @@ namespace NewLife.Log
         #endregion
 
         #region 拦截WinForm异常
-#if __MOBILE__
-#elif __CORE__
-#else
+#if !__CORE__
         private static Int32 initWF = 0;
         private static Boolean _ShowErrorMessage;
         //private static String _Title;
修改 +3 -21
diff --git a/NewLife.Core/Net/NetHelper.cs b/NewLife.Core/Net/NetHelper.cs
index 00dbca0..9ae0e48 100644
--- a/NewLife.Core/Net/NetHelper.cs
+++ b/NewLife.Core/Net/NetHelper.cs
@@ -9,7 +9,7 @@ using NewLife.Collections;
 using NewLife.Log;
 using NewLife.Model;
 using NewLife.Net;
-#if !__MOBILE__ && !__CORE__
+#if !__CORE__
 using Microsoft.Win32;
 using System.Management;
 using System.Security.AccessControl;
@@ -268,23 +268,6 @@ namespace System
         /// <returns></returns>
         public static IEnumerable<IPAddress> GetIPs()
         {
-#if __ANDROID__
-            return Dns.GetHostAddresses(Dns.GetHostName());
-#endif
-#if __IOS__
-            foreach (var netInterface in NetworkInterface.GetAllNetworkInterfaces())
-            {
-                foreach (var addrInfo in netInterface.GetIPProperties().UnicastAddresses)
-                {
-                    if (addrInfo.Address.AddressFamily == AddressFamily.InterNetwork)
-                    {
-                        yield return addrInfo.Address;
-                    }
-                }
-            }
-#endif
-#if !__MOBILE__
-
             var dic = new Dictionary<UnicastIPAddressInformation, Int32>();
             foreach (var item in GetActiveInterfaces())
             {
@@ -311,7 +294,6 @@ namespace System
                 .Select(e => e.Key.Address).ToList();
 
             return ips;
-#endif
         }
 
         private static DictionaryCache<Int32, IPAddress[]> _ips = new DictionaryCache<Int32, IPAddress[]> { Expire = 60/*, Asynchronous = true*/ };
@@ -367,7 +349,7 @@ namespace System
         #endregion
 
         #region 设置适配器信息
-#if !__MOBILE__ && !__CORE__
+#if !__CORE__
         static private ManagementObjectCollection GetInstances()
         {
             var mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
@@ -577,7 +559,7 @@ namespace System
         #endregion
 
         #region Tcp参数
-#if !__MOBILE__ && !__CORE__
+#if !__CORE__
         /// <summary>设置最大Tcp连接数</summary>
         public static void SetTcpMax()
         {
修改 +0 -4
diff --git a/NewLife.Core/Net/SerialPortConfig.cs b/NewLife.Core/Net/SerialPortConfig.cs
index 7f213c7..567b3cc 100644
--- a/NewLife.Core/Net/SerialPortConfig.cs
+++ b/NewLife.Core/Net/SerialPortConfig.cs
@@ -1,8 +1,6 @@
 using System;
 using System.ComponentModel;
-#if !__MOBILE__
 using System.IO.Ports;
-#endif
 using System.Text;
 using System.Xml.Serialization;
 using NewLife.Xml;
@@ -25,7 +23,6 @@ namespace NewLife.Net
         [Description("数据位")]
         public Int32 DataBits { get; set; } = 8;
 
-#if !__MOBILE__
         /// <summary>停止位</summary>
         [Description("停止位 None/One/Two/OnePointFive")]
         public StopBits StopBits { get; set; } = StopBits.One;
@@ -33,7 +30,6 @@ namespace NewLife.Net
         /// <summary>奇偶校验</summary>
         [Description("奇偶校验 None/Odd/Even/Mark/Space")]
         public Parity Parity { get; set; } = Parity.None;
-#endif
 
         /// <summary>文本编码</summary>
         [XmlIgnore]
修改 +0 -2
diff --git a/NewLife.Core/Net/Setting.cs b/NewLife.Core/Net/Setting.cs
index 2d1e8ae..ef0e82f 100644
--- a/NewLife.Core/Net/Setting.cs
+++ b/NewLife.Core/Net/Setting.cs
@@ -6,9 +6,7 @@ namespace NewLife.Net
 {
     /// <summary>网络设置</summary>
     [DisplayName("网络设置")]
-#if !__MOBILE__
     [XmlConfigFile(@"Config\Socket.config", 15000)]
-#endif
     public class Setting : XmlConfig<Setting>
     {
         #region 属性
修改 +0 -7
diff --git a/NewLife.Core/NewLife.Core.csproj b/NewLife.Core/NewLife.Core.csproj
index f31b2b2..bcf656c 100644
--- a/NewLife.Core/NewLife.Core.csproj
+++ b/NewLife.Core/NewLife.Core.csproj
@@ -54,9 +54,6 @@
     <Reference Include="System.Xml.Linq" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Agent\AgentService.cs">
-      <SubType>Component</SubType>
-    </Compile>
     <Compile Include="Agent\AgentServiceBase.cs">
       <SubType>Component</SubType>
     </Compile>
@@ -87,7 +84,6 @@
     <Compile Include="Collections\NullableDictionary.cs" />
     <Compile Include="Collections\ObjectPool.cs" />
     <Compile Include="Collections\Pool.cs" />
-    <Compile Include="Common\CombGuid.cs" />
     <Compile Include="Common\PinYin.cs" />
     <Compile Include="Common\Runtime.cs" />
     <Compile Include="Common\SysConfig.cs" />
@@ -97,7 +93,6 @@
     <Compile Include="Compression\ZipConstants.cs" />
     <Compile Include="Compression\ZipEntry.cs" />
     <Compile Include="Compression\ZipFile.cs" />
-    <Compile Include="Configuration\CombConfig.cs" />
     <Compile Include="Data\BinaryTree.cs" />
     <Compile Include="Http\HttpEncoder.cs" />
     <Compile Include="IO\CsvFile.cs" />
@@ -209,7 +204,6 @@
     <Compile Include="Net\ISocketSession.cs" />
     <Compile Include="Extension\EnumHelper.cs" />
     <Compile Include="Extension\StringHelper.cs" />
-    <Compile Include="Configuration\Config.cs" />
     <Compile Include="Common\DisposeBase.cs" />
     <Compile Include="Event\WeakAction.cs" />
     <Compile Include="Exceptions\XException.cs" />
@@ -279,7 +273,6 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Reflection\IIndexAccessor.cs" />
     <Compile Include="Security\Crc32.cs" />
-    <Compile Include="Common\IdentityCard.cs" />
     <Compile Include="Threading\TaskEx.cs" />
     <Compile Include="Threading\TaskHelper.cs" />
     <Compile Include="Threading\ThreadPoolX.cs" />
修改 +5 -9
diff --git a/NewLife.Core/Reflection/AssemblyX.cs b/NewLife.Core/Reflection/AssemblyX.cs
index 34c94d0..d95cd3a 100644
--- a/NewLife.Core/Reflection/AssemblyX.cs
+++ b/NewLife.Core/Reflection/AssemblyX.cs
@@ -6,9 +6,7 @@ using System.IO;
 using System.Linq;
 using System.Reflection;
 using System.Runtime.InteropServices;
-#if __MOBILE__
-#elif __CORE__
-#else
+#if !__CORE__
 using System.Web;
 #endif
 using NewLife.Log;
@@ -102,7 +100,7 @@ namespace NewLife.Reflection
             {
                 try
                 {
-#if !__IOS__ && !__CORE__
+#if !__CORE__
                     return Asm == null || Asm is _AssemblyBuilder || Asm.IsDynamic ? null : Asm.Location;
 #else
                     return Asm == null || Asm.IsDynamic ? null : Asm.Location;
@@ -129,7 +127,6 @@ namespace NewLife.Reflection
 
         static AssemblyX()
         {
-#if !__MOBILE__
             AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += (sender, args) =>
             {
                 var flag = XTrace.Debug && XTrace.Log.Level <= LogLevel.Debug;
@@ -142,7 +139,6 @@ namespace NewLife.Reflection
                 if (flag) XTrace.WriteLine("[{0}]请求加载[{1}]", args.RequestingAssembly?.FullName, args.Name);
                 return OnResolve(args.Name);
             };
-#endif
         }
         #endregion
 
@@ -538,7 +534,7 @@ namespace NewLife.Reflection
 
                     var basedir = AppDomain.CurrentDomain.BaseDirectory;
                     set.Add(basedir);
-#if !__MOBILE__ && !__CORE__
+#if !__CORE__
                     if (HttpRuntime.AppDomainId != null) set.Add(HttpRuntime.BinDirectory);
 #else
                     if (Directory.Exists("bin".GetFullPath())) set.Add("bin".GetFullPath());
@@ -619,7 +615,7 @@ namespace NewLife.Reflection
                 if (loadeds.Any(e => e.Location.EqualIgnoreCase(item)) ||
                     loadeds2.Any(e => e.Location.EqualIgnoreCase(item))) continue;
 
-#if !__MOBILE__ && !__CORE__
+#if !__CORE__
                 var asm = ReflectionOnlyLoadFrom(item, ver);
                 if (asm == null) continue;
 #else
@@ -654,7 +650,7 @@ namespace NewLife.Reflection
             }
         }
 
-#if !__MOBILE__ && !__CORE__
+#if !__CORE__
         /// <summary>只反射加载指定路径的所有程序集</summary>
         /// <param name="file"></param>
         /// <param name="ver"></param>
修改 +0 -2
diff --git a/NewLife.Core/Serialization/Binary/Binary.cs b/NewLife.Core/Serialization/Binary/Binary.cs
index a1bc311..946dd25 100644
--- a/NewLife.Core/Serialization/Binary/Binary.cs
+++ b/NewLife.Core/Serialization/Binary/Binary.cs
@@ -411,7 +411,6 @@ namespace NewLife.Serialization
         #endregion
 
         #region 跟踪日志
-#if !__MOBILE__
         /// <summary>使用跟踪流。实际上是重新包装一次Stream,必须在设置Stream后,使用之前</summary>
         public virtual void EnableTrace()
         {
@@ -420,7 +419,6 @@ namespace NewLife.Serialization
 
             Stream = new TraceStream(stream) { Encoding = Encoding, IsLittleEndian = IsLittleEndian };
         }
-#endif
         #endregion
 
         #region 快捷方法
修改 +1 -7
diff --git a/NewLife.Core/Setting.cs b/NewLife.Core/Setting.cs
index bc1cd62..fa99410 100644
--- a/NewLife.Core/Setting.cs
+++ b/NewLife.Core/Setting.cs
@@ -8,9 +8,7 @@ namespace NewLife
 {
     /// <summary>核心设置</summary>
     [DisplayName("核心设置")]
-#if !__MOBILE__
     [XmlConfigFile(@"Config\Core.config", 15000)]
-#endif
     public class Setting : XmlConfig<Setting>
     {
         #region 属性
@@ -61,7 +59,6 @@ namespace NewLife
             if (TempPath.IsNullOrEmpty()) TempPath = web ? "..\\XTemp" : "XTemp";
             if (LogFileFormat.IsNullOrEmpty()) LogFileFormat = "{0:yyyy_MM_dd}.log";
 
-#if !__MOBILE__
             if (PluginCache.IsNullOrWhiteSpace())
             {
                 // 兼容Linux Mono
@@ -69,8 +66,7 @@ namespace NewLife
                 if (sys.IsNullOrEmpty()) sys = "/";
                 PluginCache = Path.GetPathRoot(sys).CombinePath("X", "Cache");
             }
-#endif
-            if (PluginServer.IsNullOrWhiteSpace() || PluginServer.StartsWithIgnoreCase("ftp://")) PluginServer = "http://x.newlifex.com/";
+            if (PluginServer.IsNullOrWhiteSpace()) PluginServer = "http://x.newlifex.com/";
 
             base.OnLoaded();
         }
@@ -85,7 +81,6 @@ namespace NewLife
         {
             var cachedir = PluginCache;
 
-#if !__MOBILE__
             // 确保缓存目录可用
             for (var i = 0; i < 2; i++)
             {
@@ -108,7 +103,6 @@ namespace NewLife
                     PluginCache = cachedir;
                 }
             }
-#endif
 
             return cachedir;
         }
修改 +0 -2
diff --git a/NewLife.Core/Xml/XmlConfig.cs b/NewLife.Core/Xml/XmlConfig.cs
index 77bf4a7..c65c24c 100644
--- a/NewLife.Core/Xml/XmlConfig.cs
+++ b/NewLife.Core/Xml/XmlConfig.cs
@@ -110,10 +110,8 @@ namespace NewLife.Xml
                 {
                     // 这里不能着急,派生类可能通过静态构造函数指定配置文件路径
                     //throw new XException("编码错误!请为配置类{0}设置{1}特性,指定配置文件!", typeof(TConfig), typeof(XmlConfigFileAttribute).Name);
-#if !__MOBILE__
                     _.ConfigFile = "Config\\{0}.config".F(typeof(TConfig).Name);
                     _.ReloadTime = 10000;
-#endif
                 }
                 else
                 {
修改 +6 -2
diff --git a/NewLife.CoreST/NewLife.CoreST.csproj b/NewLife.CoreST/NewLife.CoreST.csproj
index 1fb4916..cdcd4a7 100644
--- a/NewLife.CoreST/NewLife.CoreST.csproj
+++ b/NewLife.CoreST/NewLife.CoreST.csproj
@@ -30,6 +30,12 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <Compile Remove="Configuration\**" />
+    <EmbeddedResource Remove="Configuration\**" />
+    <None Remove="Configuration\**" />
+  </ItemGroup>
+
+  <ItemGroup>
     <Compile Remove="Stub\NonSerializedAttribute.cs" />
     <Compile Remove="Stub\SerializableAttribute.cs" />
   </ItemGroup>
@@ -52,7 +58,6 @@
     <Compile Include="..\NewLife.Core\Collections\ObjectPool.cs" Link="Collections\ObjectPool.cs" />
     <Compile Include="..\NewLife.Core\Collections\Pool.cs" Link="Collections\Pool.cs" />
     <Compile Include="..\NewLife.Core\Common\DisposeBase.cs" Link="Common\DisposeBase.cs" />
-    <Compile Include="..\NewLife.Core\Common\IdentityCard.cs" Link="Common\IdentityCard.cs" />
     <Compile Include="..\NewLife.Core\Common\PinYin.cs" Link="Common\PinYin.cs" />
     <Compile Include="..\NewLife.Core\Common\Runtime.cs" Link="Common\Runtime.cs" />
     <Compile Include="..\NewLife.Core\Common\SysConfig.cs" Link="Common\SysConfig.cs" />
@@ -253,7 +258,6 @@
     <Folder Include="Applications\IP\" />
     <Folder Include="Collections\" />
     <Folder Include="Compression\" />
-    <Folder Include="Configuration\" />
     <Folder Include="Data\" />
     <Folder Include="Event\" />
     <Folder Include="Exceptions\" />
修改 +1 -3
diff --git a/XCode/Membership/MenuProvider.cs b/XCode/Membership/MenuProvider.cs
index 9bd8b88..8a23a12 100644
--- a/XCode/Membership/MenuProvider.cs
+++ b/XCode/Membership/MenuProvider.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Text;
-using NewLife.Configuration;
 using NewLife.Model;
 
 namespace XCode.Membership
@@ -16,9 +15,8 @@ namespace XCode.Membership
         /// <param name="remark">备注</param>
         public abstract void WriteLog(Type type, String action, String remark);
 
-        private Boolean _Enable = true;
         /// <summary>是否使用日志</summary>
-        public Boolean Enable { get { return _Enable; } set { _Enable = value; } }
+        public Boolean Enable { get; set; } = true;
         #endregion
 
         #region 静态属性