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 Dimension Add(Dimension other) { if (object.ReferenceEquals(this, other)) { throw new InvalidOperationException("Addition must use two different dimension instances"); } // TODO: write tests for this return new Dimension("{0}{1}{2}".FormatWith(dimensionString, UrlSeparator, other.dimensionString)); }
public Query WithDimensions(Dimension dimension) { return new Query(profileId, dt1, dt2, metric, this.dimension + dimension); }