blob: be63cdeec91d4c6198cd211b39862e1a0888d17b [file] [log] [blame]
using System;
namespace AppsheetEpplus;
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");
}
}