private static bool isOperationsInProgress(MonoBehaviour behavior, IList <ISyncOperation> operations) { //Profiler.BeginSample(string.Format("{0}[{1}].isOperationsInProgress({2})", behavior.GetType().Name, behavior.name, operations != null ? operations.Count : 0)); bool result = false; if (null != operations) { for (int i = 0; i < operations.Count; i++) { ISyncOperation operation = operations[i]; if (operation == null) { continue; } //Profiler.BeginSample(string.Format("{0}.IsComplete()", operation.GetType().Name)); if (null != operations[i] && !operations[i].IsComplete()) { result = true; // Profiler.EndSample(); break; } //Profiler.EndSample(); } } //Profiler.EndSample(); return(result); }
public virtual OperationAggregator HasOperation(ISyncOperation newOperation) { Operations.Add(newOperation); newOperation.SetParent(this); newOperation.OperationCompleted += OnOperationCompleted; return(this); }
public void Play() { started = true; operation = operationProvider(); }
public LazyAsyncOperationScenarioItem(Func <ISyncOperation> operationProvider) { this.started = false; this.operationProvider = operationProvider; this.operation = null; }
public AsyncOperationScenarioItem(ISyncOperation syncOperation) { this.started = false; this.syncOperation = syncOperation; }