public static void AddSentiment(this RatingData instance, SentimentValueData data) { if (data.IsPositive) { instance.AddPositive(Math.Abs(data.Value)); } else { instance.AddNegative(Math.Abs(data.Value)); } }