private Return<object> CountBeginningOfSentenceDirtyHands(CountWrapper wrapper) { Return<object> _answer = new Return<object>(); if (wrapper == null) { _answer.theresError = true; _answer.error = Utility.GetError(new ArgumentNullException("wrapper"), this.GetType()); } else { try { foreach (WritableTuple<string, int> _tuple in wrapper.textToFind) foreach (string _sentence in wrapper.sentences) _tuple.Item2 += _sentence.StartsWith(_tuple.Item1) ? 1 : 0; } catch (Exception _ex) { _answer.theresError = true; _answer.error = Utility.GetError(_ex, this.GetType()); } } return _answer; }
private void processorCountExistingStrings_ErrorProcessEntity(CountWrapper entity, Error error) { errorsMultithreadedProcess.Add(new WritableTuple<object, Error>(entity, error)); }
private Return<object> CountDirtyHands(CountWrapper wrapper) { Return<object> _answer = new Return<object>(); if (wrapper == null) { _answer.theresError = true; _answer.error = Utility.GetError(new ArgumentNullException("wrapper"), this.GetType()); } else { try { foreach (WritableTuple<string, int> _tuple in wrapper.textToFind) _tuple.Item2 = wrapper.textWrapper.NumberAppearances(_tuple.Item1); } catch (Exception _ex) { _answer.theresError = true; _answer.error = Utility.GetError(_ex, this.GetType()); } } return _answer; }