public static void Feedback(IObserver <FeedbackInfo> observer, FeedbackInfo info) { if (observer != null) { observer.OnNext(info); } }
public static void Feedback(IObserver <FeedbackInfo> observer, FeedbackInfo info, string logFilePath, bool enableLog = true) { Feedback(observer, info); if (EnableLog && enableLog) { string prefix = ""; if (info.Source != null && info.Source.GetType() == typeof(VideoInfo)) { prefix = ((VideoInfo)info.Source).Name + ":"; } LogHelper.LogInfo(logFilePath, prefix + info.Content); } }