コード例 #1
0
 public override void Start()
 {
     try {
         Workspace           = WorkspaceFactory.Get();
         Workspace.Updated  += Workspace_Updated;
         Workspace.Reloaded += Workspace_Reloaded;
     } catch (Exception ex) {
         Log.Error("Failed to set up the workspace monitor, clients will not receive updates");
         Log.Error(ex);
     }
 }
コード例 #2
0
        public override GetStatusResponse Start()
        {
            var objWsItem = WorkspaceFactory.Get().Get(Request.ItemID);

            if (objWsItem != null && objWsItem.Project != null)
            {
                objWsItem.Project.TargetName = Request.ProjectTargetName;
                return(new GetStatusResponse(Request, new List <Data.WorkspaceItem> {
                    objWsItem.GetWorkspaceItem()
                }));
            }
            return(new GetStatusResponse(Request, new ResponseStatus(ResponseState.Error, "Project not found")));
        }
コード例 #3
0
        public override GetStatusResponse Start()
        {
            var objWsItem = WorkspaceFactory.Get().Get(Request.ItemID);

            if (objWsItem != null && objWsItem.Project != null)
            {
                MeltJobScheduler.GetScheduler().Schedule(objWsItem.Project.Job);
                return(new GetStatusResponse(Request, new List <Data.WorkspaceItem>()
                {
                    objWsItem.GetWorkspaceItem()
                }));
            }
            return(new GetStatusResponse(Request, new ResponseStatus(ResponseState.Error, "Project not found")));
        }
コード例 #4
0
        public override GetStatusResponse Start()
        {
            var objWsItem = WorkspaceFactory.Get().Get(Request.ItemID);

            if (objWsItem != null && objWsItem.Project != null)
            {
                if (objWsItem.UpdateNew(new VideoInfoProvider().Get(Path.Combine(Settings.NewDirectory, Request.ProjectSourceName))))
                {
                    return(new GetStatusResponse(Request, new List <Data.WorkspaceItem>()
                    {
                        objWsItem.GetWorkspaceItem()
                    }));
                }
                return(new GetStatusResponse(Request, new ResponseStatus(ResponseState.Error, "File not found")));
            }
            return(new GetStatusResponse(Request, new ResponseStatus(ResponseState.Error, "Project not found")));
        }