public void ExecuteSVNAction(IEnumerable <ICommandLineOperation> operations) { if (!EditorApplication.isPlaying) { if (!IsBusy()) { var commandQueue = new Queue <ICommandLineOperation>(); foreach (var operationIt in operations) { commandQueue.Enqueue(operationIt); } var commandQueueOperation = new QueuedCommandLineOperation(commandQueue); mSVNCurrentAssetsOperation = commandQueueOperation; OnDatabaseHandlerEvent(new SVNDatabaseBusyArgs(mSVNCurrentAssetsOperation)); mSVNCurrentAssetsOperation.Execute(); } else { string request = operations.Aggregate("", (current, operationIt) => current + (operationIt + "\n")); Debug.Log("Busy with: \n" + mSVNCurrentAssetsOperation + "\n\nOperation canceled: \n" + request); } } else { Debug.Log("SVN Action ignored during play"); } }
public void Execute() { currentCommand.command.ExecutionFinished += (source, e) => { if (commandQueue.Count > 0) { currentCommand = commandQueue.Dequeue(); Execute(); } }; currentCommand.Execute(); }
public void ExecuteSVNAction(ICommandLineOperation operation) { ExecuteSVNAction(new[] { operation }); }
public SVNDatabaseBusyArgs(ICommandLineOperation commandlineOperation) { this.commandlineOperation = commandlineOperation; }