private SerializableFunction MapQueryFunction(QueryFunction queryFunction) { var resultFunction = new SerializableFunction(); var functionType = queryFunction.GetType(); switch (functionType.ToString()) { case "Terrasoft.Core.DB.DatePartQueryFunction": var datePartQueryFunction = (Terrasoft.Core.DB.DatePartQueryFunction)queryFunction; resultFunction.Expression = datePartQueryFunction.Expression; resultFunction.FunctionType = SerializableFunctionType.DatePart; resultFunction = new SerializableDatePartFunction(resultFunction) { Interval = datePartQueryFunction.Interval, UseUtcOffset = datePartQueryFunction.UseUtcOffset }; break; } return(resultFunction); }
public SerializableDatePartFunction(SerializableFunction sourceFunction) { this.Expression = sourceFunction.Expression; this.FunctionType = sourceFunction.FunctionType; }