internal void HandleResponse(string serialized, T service, DisterService <T> disterService, string id) { var o = disterService.Serializer.Deserialize(serialized, responseType); var arr = waitingChunks.ToArray(); if (arr.Any(x => x.Key == id)) { var currentChunk = arr.First(x => x.Key == id); waitingChunks = new ConcurrentBag <KeyValuePair <string, object> >(waitingChunks.Except(new[] { currentChunk })); responseHandler(o, service); } }
public void Initialize(ISerializer serializer, DisterService service) { this.serializer = serializer; this.service = service; }