public ItemSearchFactory( ITemplateMapProvider templateMapProvider, ISearchResultsAdapter searchResultsAdapter) { TemplateMapProvider = templateMapProvider; SearchResultsAdapter = searchResultsAdapter; }
public void Initialise() { // Create mock objects _modelAssemblyProvider = new ModelAssemblyProvider(); _templateMappingProvider = new TemplateMapProvider(_modelAssemblyProvider); _spawnProvider = new SpawnProvider(_templateMappingProvider); }
public void Initialise() { // Create mock objects _modelAssemblyProvider = new ModelAssemblyProvider(); _templateMappingProvider = new TemplateMapProvider(_modelAssemblyProvider); _spawnProvider = new SpawnProvider(_templateMappingProvider); }
public void Initialise() { // Create mock objects _mockContextProvider = new Mock <IContextProvider>(); _modelAssemblyProvider = new ModelAssemblyProvider(); _templateMappingProvider = new TemplateMapProvider(_modelAssemblyProvider); _spawnProvider = new SpawnProvider(_templateMappingProvider); _itemFactory = new ItemFactory(_mockContextProvider.Object, _spawnProvider); }
public static IQueryable <TSource> WhereTemplate <TSource>(this IQueryable <TSource> queryable, ITemplateMapProvider templateMapProvider) where TSource : IItemWrapper { var typeOfT = typeof(TSource); if (templateMapProvider.InterfaceTemplateMap.ContainsKey(typeOfT)) { var templateId = templateMapProvider.InterfaceTemplateMap[typeOfT]; queryable = queryable.Filter(item => item.TemplateIds.Contains(templateId)); } return(queryable); }
public SpawnProvider(ITemplateMapProvider templateMappingProvider) { _templateMapProvider = templateMappingProvider; }
public void Initialise() { // Create mock objects _mockContextProvider = new Mock<IContextProvider>(); _modelAssemblyProvider = new ModelAssemblyProvider(); _templateMappingProvider = new TemplateMapProvider(_modelAssemblyProvider); _spawnProvider = new SpawnProvider(_templateMappingProvider); _itemFactory = new ItemFactory(_mockContextProvider.Object, _spawnProvider); }