Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/4.0.3/EPPlus-4.0.3/FormulaParsing/Excel/Functions/RefAndLookup/LookupNavigatorFactory.cs @ 12074

Last change on this file since 12074 was 12074, checked in by sraggl, 9 years ago

#2341: Added EPPlus-4.0.3 to ExtLibs

File size: 871 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup
7{
8    public static class LookupNavigatorFactory
9    {
10        public static LookupNavigator Create(LookupDirection direction, LookupArguments args, ParsingContext parsingContext)
11        {
12            if (args.ArgumentDataType == LookupArguments.LookupArgumentDataType.ExcelRange)
13            {
14                return new ExcelLookupNavigator(direction, args, parsingContext);
15            }
16            else if (args.ArgumentDataType == LookupArguments.LookupArgumentDataType.DataArray)
17            {
18                return new ArrayLookupNavigator(direction, args, parsingContext);
19            }
20            throw new NotSupportedException("Invalid argument datatype");
21        }
22    }
23}
Note: See TracBrowser for help on using the repository browser.