Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
        //--------------------------------------------------------------------------------
        /// <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);
        }
Ejemplo n.º 3
0
 //--------------------------------------------------------------------------------
 /// <summary>
 ///  Sets the service client object to null
 /// </summary>
 public static void ResetServiceClient()
 {
     SvcClient = null;
 }
Ejemplo n.º 4
0
 public MenuSyncService(IDynamicMenuRepository repository
                        , ISynchroService synchro
                        , ApplicationDbContext context) : base(repository, synchro, context)
 {
 }
Ejemplo n.º 5
0
 public ActivitySyncService(IActivityRepository repository
                            , ISynchroService synchro
                            , ApplicationDbContext context) : base(repository, synchro, context)
 {
 }
Ejemplo n.º 6
0
 public SynchroHostedService(ISynchroService scopedProcessingService)
 {
     _scopedProcessingService = scopedProcessingService;
 }