private void InitProxy() { try { proxy = null; DuplexChannelFactory <ISubscribeNotification> factory = new DuplexChannelFactory <EFG.OPS.NotificationEngineService.Contracts.Interfaces.ISubscribeNotification>(new InstanceContext(this), "ISubscribeNotificationEndPoint"); proxy = factory.CreateChannel(); } catch (Exception exp) { m_NLog.Error("Error in InitProxy method . Error Details : {0} ", exp.ToString()); } }
/// <summary> /// 初始化 <see cref="SubscribeManager"/> 类的新实例。 /// </summary> /// <param name="serviceProvider"></param> public SubscribeManager(IServiceProvider serviceProvider) { ServiceProvider = serviceProvider; _persistance = serviceProvider.TryGetService <ISubjectPersistance>(() => LocalFilePersistance.Default); _notification = serviceProvider.TryGetService <ISubscribeNotification>(); }
public void MakeProxy() { DuplexChannelFactory <ISubscribeNotification> factory = new DuplexChannelFactory <EFG.OPS.NotificationEngineService.Contracts.Interfaces.ISubscribeNotification>(new InstanceContext(this), "ISubscribeNotificationEndPoint"); proxy = factory.CreateChannel(); }