private Query(int profileId, DateTime dt1, DateTime dt2, Metric metric = null, Dimension dimension = null) { this.profileId = profileId; this.dt1 = dt1; this.dt2 = dt2; this.metric = metric ?? Metric.Empty; this.dimension = dimension ?? Dimension.Empty; }
public Metric Add(Metric other) { if (object.ReferenceEquals(this, other)) { throw new InvalidOperationException("Addition must use two different metric instances"); } // TODO: write tests for this return new Metric("{0}{1}{2}".FormatWith(metricString, UrlSeparator, other.metricString)); }
public Query WithMetrics(Metric metric) { return new Query(profileId, dt1, dt2, this.metric + metric, dimension); }