public bool TryCall(Request request) { if (isCalling.Get()) { return(false); } Call(Serializator.Clone(request)); isCalling.Set(true); return(true); }
public void Initialize(List <Request> requests) { this.requests = Serializator.Clone(requests); pending = new List <Request>(); callers = new List <Caller>(); for (int n = 0; n < Current.Context.ParallelRequests; n++) { callers.Add(new Caller(this)); } }
private void SaveContext(string filename) { Serializator.ToFile(filename, Current.Context); }
private void LoadContext(string filename) { Current.Context = Serializator.FromFile <Context>(filename); ContextToForm(); ListToListView(); }