Ejemplo n.º 1
0
        public ChannelProvider(BackendHub backend)
        {
            backend.ChannelRequest += (sender, e) =>
            {
                switch (e.Action)
                {
                case BackendAction.Download:
                    Task.Run(() => Download(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Create:
                    Task.Run(() => Create(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Import:
                    Task.Run(() => Import(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Remove:
                    Task.Run(() => Remove(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Update:
                    Task.Run(() => Update(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                default:
                    break;
                }
            };
        }
Ejemplo n.º 2
0
        public PlayListProvider(ref SQLDatabase db, BackendHub backend)
        {
            this.db = db;
            backend.PlayListRequest += (sender, e) =>
            {
                switch (e.Action)
                {
                case BackendAction.Download:
                    Task.Run(() => Download(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Create:
                    Task.Run(() => Create(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Import:
                    Task.Run(() => Import(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Remove:
                    Task.Run(() => Remove(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Update:
                    Task.Run(() => Update(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                default:
                    break;
                }
            };
        }
Ejemplo n.º 3
0
        public EPGProvider(ref SQLDatabase db, BackendHub backend)
        {
            fs      = new Filesystem(Directory.GetCurrentDirectory());
            this.db = db;

            backend.EPGRequest += (sender, e) =>
            {
                switch (e.Action)
                {
                case BackendAction.Download:
                    Task.Run(() => Download(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Create:
                    Task.Run(() => Create(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Import:
                    Task.Run(() => Import(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Remove:
                    Task.Run(() => Remove(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                case BackendAction.Update:
                    Task.Run(() => Update(e.Provider, e.Response, e.Parameters, e.Context));
                    break;

                default:
                    break;
                }
            };
        }