コード例 #1
0
        public ClipPlayerServiceAgent()
        {
            videoServer = new AppServerMgrProxy();
            videoServer.SetHost(ConfigurationManager.AppSettings["K2Ip"]);
            videoServer.SetUserCredentials(ConfigurationManager.AppSettings["K2UserName"],
                                           ConfigurationManager.AppSettings["K2Password"], "", false);

            if (!videoServer.Connect())
            {
                Console.WriteLine("*** Cannot connect to the K2 ***");
                return;
            }

            appName = "RCS.K2.NFLN";
            client  = "Client 1";

            bool newConnection = false;

            iappServer = videoServer.CreateAppServer(appName, client, out newConnection);

            bool isNewController = false;

            icontroller = iappServer.CreateController(appName, "C1", out isNewController);
            player      = (ISimplePlayerRecorder)icontroller;

            using (var sql = new NFLLookupEntities())
            {
                Videos = new List <VideoClip>(sql.VideoClips);
            }
        }
コード例 #2
0
 public ClockWorks(ISimpleController simpleController)
 {
     this.simpleController = simpleController ?? throw new System.ArgumentNullException(nameof(simpleController));
 }
コード例 #3
0
 protected ControllerCommandBase(ISimpleController controller, Func <bool> condition)
 {
     Controller = controller;
     Condition  = condition;
 }