void NotifyHandDifference(HandDifference handDifference) { var translator = LanguageManager.Instance.Translator; foreach (IHand hand in handDifference.IncreasedDifference) { string handName = HandNameTranslator.Translate(hand.Name, translator); string message = translator.Translate(TranslatableKeys.HandCompleteMessage).Text .Replace("#HAND_NAME#", handName); //キーワードの置き換えはここでやるべきではない logger.Log(message); } foreach (IHand hand in handDifference.DecreasedDifference) { string handName = HandNameTranslator.Translate(hand.Name, translator); string message = translator.Translate(TranslatableKeys.HandUncompleteMessage).Text .Replace("#HAND_NAME#", handName); //キーワードの置き換えはここでやるべきではない logger.Log(message); } notifiedHands = handUseCase.GetCurrentHands().ToArray(); //コピーのためのToArray }
protected override void Write(LogEventInfo logEvent) { var msg = Layout.Render(logEvent); if (logEvent.Level.Ordinal >= 4) { Logger.LogError(Tag, msg); } else if (logEvent.Level.Ordinal >= 3) { Logger.LogWarning(Tag, msg); } else { Logger.Log(Tag, msg); } if (logEvent.Exception != null) { Logger.LogException(logEvent.Exception); } }