using Aitex.Core.Util; using Aitex.Core.WCF; using MECF.Framework.Common.Equipment; using MECF.Framework.Common.RecipeCenter; using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Common.WcfService { public class SomebodyClient : Singleton { public bool InProcess { get; set; } private IService _service; public IService Service { get { if (_service == null) { if (InProcess) _service = new SomebodyService(); else _service = new SomebodyServiceClient(); } return _service; } } } public class SomebodyServiceClient : ServiceClientWrapper, IService { public SomebodyServiceClient() : base("Client_IService", "SomeBodyService") { Trace.WriteLine("SomebodyServiceClient 初始化"); } public string GetSomebodyName(ModuleName module, string SomebodyName) { string result = null; Invoke(svc => { result = svc.GetSomebodyName(module, SomebodyName); }); return result; } } }