blob: d4445257fac0e914adf4d3e2b97612836c0eaa1f [file] [log] [blame]
using System;
namespace OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
public static class LookupNavigatorFactory {
public static LookupNavigator Create(
LookupDirection direction,
LookupArguments args,
ParsingContext parsingContext) {
if (args.ArgumentDataType == LookupArguments.LookupArgumentDataType.ExcelRange) {
return new ExcelLookupNavigator(direction, args, parsingContext);
}
if (args.ArgumentDataType == LookupArguments.LookupArgumentDataType.DataArray) {
return new ArrayLookupNavigator(direction, args, parsingContext);
}
throw new NotSupportedException("Invalid argument datatype");
}
}