Ejemplo n.º 1
0
 public ServicePublisher(IServiceCore core)
 {
     _service  = core;
     LocalName = Environment.MachineName;
     _service.PacketReceived += _service_PacketReceived;
     //_listener.FindService
     //listener.FindServices += listener_FindServices;
 }
        public ServiceRequestRepeater(IServiceCore service, string protocol, ITimer timer)
        {
            _service = service;
            _timer   = timer;
            _proto   = protocol;
            _waiting = !_service.Connected;

            _timer.Fired += _timer_Fired;
            _service.NetworkStatusChanged += _service_NetworkStatusChanged;
            _waiting = true;
        }
Ejemplo n.º 3
0
 public void Init(IServiceCore service)
 {
     ResSections = service
                   .AppResourceSectionService
                   .Select(s => new ResSectionDto
     {
         Id         = s.Id,
         Name       = s.Name,
         DateCreate = s.DateCreate
     })
                   .ToList();
 }
Ejemplo n.º 4
0
        public SectionEditModel(IServiceCore service, int id = 0)
        {
            var settings = service.SectionSettingsService.Settings;

            Overflow = service.SectionService
                       .Where(s => s.IsActive && !s.IsDefault && !s.IsDelete)
                       .Count() >= settings.MaxAllowedSections;
            OverflowOnTop = service
                            .SectionService
                            .Where(x => x.IsActive && !x.IsDefault && !x.IsDelete && x.OnAside)
                            .Count() >= settings.MaxAllowedSectionsOnTop;

            TotalAll = service.SectionService
                       .Where(s => s.IsActive && !s.IsDelete && !s.IsDefault)
                       .Count();

            TotalOnTop = service.SectionService
                         .Where(s => s.IsActive && !s.IsDelete && !s.IsDefault && s.OnAside)
                         .Count();

            TotalOther = service.SectionService
                         .Where(s => s.IsActive && !s.IsDelete && !s.IsDefault && !s.OnAside)
                         .Count();

            AllowSections     = settings.MaxAllowedSections;
            AllowOnTopSection = settings.MaxAllowedSectionsOnTop;
            if (id > 0)
            {
                var section = service.SectionService[id];
                if (section != null)
                {
                    Id          = section.Id;
                    Name        = section.Name;
                    Description = section.Description;
                    OnTop       = section.OnAside;
                    IsActive    = section.IsActive;
                    IsDelete    = section.IsDelete;
                    ImageId     = section.ImageId;
                }
            }
        }
Ejemplo n.º 5
0
 public CitiesController(IServiceCore serviceCore)
 {
     _serviceCore = serviceCore ?? throw new ArgumentNullException(nameof(serviceCore));
 }
Ejemplo n.º 6
0
 public ServiceWatchManager(IServiceCore core)
 {
     _service = core;
     _service.PacketReceived += _service_PacketReceived;
     _service.Start();
 }
Ejemplo n.º 7
0
 public ControllerCore(IServiceCore <TViewModel, TEntity, TId> service) => _service = service;
Ejemplo n.º 8
0
 public ResSectionController(IServiceCore service)
 {
     this.service = service;
 }
Ejemplo n.º 9
0
 public SectionController(IServiceCore service, ISectionService sectionService)
 {
     this.service        = service;
     this.sectionService = sectionService;
 }
Ejemplo n.º 10
0
 public UsersIndexViewModel(IServiceCore service)
 {
     this.service = service;
     //TODO описать для юзеров
 }