Beispiel #1
0
 /// <summary>
 /// 加载
 /// </summary>
 /// <param name="adbToolsDir"></param>
 /// <param name="adb"></param>
 /// <param name="fastboot"></param>
 /// <param name="server"></param>
 /// <param name="startTheServer"></param>
 public static void Load(DirectoryInfo adbToolsDir, FileInfo adb, FileInfo fastboot, IAdbServer server, bool startTheServer)
 {
     AdbToolsDir  = adbToolsDir;
     AdbFile      = adb;
     FastbootFile = fastboot;
     Server       = server;
     if (startTheServer)
     {
         Server.Start();
     }
 }
Beispiel #2
0
        public static void Load(DirectoryInfo adbToolsDir, FileInfo adbClient, FileInfo fastbootClient, IAdbServer server, bool startTheServer)
        {
            var manager = new DefaultAdbManager()
            {
                AdbFile = adbClient ?? throw new ArgumentNullException(nameof(adbClient)),
                                FastbootFile = fastbootClient ?? throw new ArgumentNullException(nameof(fastbootClient)),
                                                     Server = server ?? throw new ArgumentNullException(nameof(server)),
                                                                    ToolsDir = adbToolsDir ?? throw new ArgumentNullException(nameof(adbToolsDir))
            };

            if (startTheServer)
            {
                Server.Start();
            }
        }
    }