Beispiel #1
0
 private void HandleCommandComplete(int exitCode, string output, string error,
                                    CommandCompleteHandler continuation, CommandCompleteHandler externalCallback)
 {
     try
     {
         bool   success = exitCode == 0;
         string message = success ? output : error;
         continuation(success, message);
         externalCallback?.Invoke(success, message);
     }
     catch (Exception e)
     {
         // marshal exceptions back to main thread for Unity to handle them
         _threadMarshaller.Marshal(() => Throw(e));
     }
 }
Beispiel #2
0
 private void RunCommand(string command, CommandCompleteHandler continuation, CommandCompleteHandler externalCallback = null)
 {
     Debug.Log("Running git " + command);
     _commandRunner.Run(command, (code, o, e) => HandleCommandComplete(code, o, e, continuation, externalCallback));
 }
Beispiel #3
0
 public void Update(CommandCompleteHandler handler = null)
 {
     RunCommand("lfs locks --json", HandleLocksCommandComplete, handler);
 }