Esempio n. 1
0
        public void AddChannel(MxfDvbsService service, int preset)
        {
            var channel = _channels.SingleOrDefault(arg => arg._service.Equals(service) && arg.Preset == preset);

            if (channel != null)
            {
                return;
            }

            channel = new MxfDvbsChannel
            {
                _headend = this,
                _service = service,
                Preset   = preset
            };
            _channels.Add(channel);
        }
Esempio n. 2
0
        public MxfDvbsService GetOrCreateService(string name, int sid, int type, bool encrypted)
        {
            var service = _services.SingleOrDefault(arg => arg.ServiceId == (short)(sid & 0xFFFF));

            if (service != null)
            {
                return(service);
            }

            service = new MxfDvbsService
            {
                _transponder = this,
                Name         = name,
                ServiceId    = sid,
                ServiceType  = type,
                IsEncrypted  = encrypted
            };
            _services.Add(service);
            return(service);
        }