public AggregateExitOperation(IProjection projection) { string projectionAsString = projection.ToString(); int start = projectionAsString.IndexOf("("); string aggregateName = projectionAsString.Substring(0, start); start++; int stop = projectionAsString.IndexOf(")"); _fieldName = projectionAsString.Substring(start, stop - start); _aggregate = (SupportedAggregations) Enum.Parse(_aggregate.GetType(), aggregateName.ToUpper()); }
public AggregateExitOperation(IProjection projection) { string projectionAsString = projection.ToString(); int start = projectionAsString.IndexOf("("); string aggregateName = projectionAsString.Substring(0, start); start++; int stop = projectionAsString.IndexOf(")"); _fieldName = projectionAsString.Substring(start, stop - start); _aggregate = (SupportedAggregations)Enum.Parse(_aggregate.GetType(), aggregateName.ToUpper()); }