示例#1
0
 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;
 }
示例#2
0
 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));
 }
示例#3
0
 public Query WithMetrics(Metric metric)
 {
     return new Query(profileId, dt1, dt2, this.metric + metric, dimension);
 }