123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 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<SomebodyClient>
- {
- 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>, 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;
- }
- }
- }
|