public BaseSyncService(ICRUDRepository <TEntity, TID> repository , ISynchroService synchro , ApplicationDbContext context) { _repository = repository ?? throw new ArgumentNullException(nameof(repository)); _synchro = synchro ?? throw new ArgumentNullException(nameof(synchro)); _context = context ?? throw new ArgumentNullException(nameof(context)); }
//-------------------------------------------------------------------------------- /// <summary> /// Creates the service client object /// </summary> /// <returns></returns> public static bool CreateServiceClient() { bool available = (SvcClient != null); if (SvcClient == null) { try { ChannelFactory <ISynchroService> factory = new ChannelFactory <ISynchroService>(m_binding, new EndpointAddress(m_baseAddress.AbsoluteUri)); SvcClient = factory.CreateChannel(); available = (SvcClient != null); } catch (Exception ex) { throw new Exception("Exception encountered while creating SvcClient", ex); } } return(available); }
//-------------------------------------------------------------------------------- /// <summary> /// Sets the service client object to null /// </summary> public static void ResetServiceClient() { SvcClient = null; }
public MenuSyncService(IDynamicMenuRepository repository , ISynchroService synchro , ApplicationDbContext context) : base(repository, synchro, context) { }
public ActivitySyncService(IActivityRepository repository , ISynchroService synchro , ApplicationDbContext context) : base(repository, synchro, context) { }
public SynchroHostedService(ISynchroService scopedProcessingService) { _scopedProcessingService = scopedProcessingService; }