static ServerMonitor updateServerMonitor(ServerMonitor sm, Core.Server.TradeServer s)
 {
     sm.Uri = s.Uri;
     sm.MaxDegreeOfParallelism = s.MaxDegreeOfParallelism;
     sm.Enabled = s.Enabled;
     return(sm);
 };
Beispiel #2
0
        public static ServerMonitor ToServerMonitor(this Core.Server.TradeServer tradeServer, HttpClient httpClient)
        {
            if (tradeServer == null)
            {
                throw new ArgumentNullException(nameof(tradeServer));
            }

            return(new ServerMonitor(httpClient)
            {
                Name = tradeServer.Name,
                Uri = tradeServer.Uri,
                MaxDegreeOfParallelism = tradeServer.MaxDegreeOfParallelism,
                Enabled = tradeServer.Enabled
            });
        }
        public static TradeServer ToWpfTradeServer(this Core.Server.TradeServer tradeServer)
        {
            if (tradeServer == null)
            {
                throw new ArgumentNullException(nameof(tradeServer));
            }

            return(new TradeServer
            {
                Name = tradeServer.Name,
                Uri = tradeServer.Uri,
                MaxDegreeOfParallelism = tradeServer.MaxDegreeOfParallelism,
                Enabled = tradeServer.Enabled
            });
        }