internal async Task Map_Predefined_Configurations(PredefinedMap predefinedMap, Type[] assembliesToLoad, Platform platform, string[] collectionNames) { InitializeMapperService($"{nameof(Map_Predefined_Configurations)}{predefinedMap}", platform); assembliesToLoad.ToObservable().Do(type => Assembly.LoadFile(type.Assembly.Location)).Subscribe(); var modelType = await predefinedMap.MapToModel().ModelInterfaces().FirstAsync(); var propertyInfos = modelType.GetProperties(); AssertPredefinedConfigurationsMap(predefinedMap, collectionNames, modelType, propertyInfos); AssertBandedGridColumn(predefinedMap, propertyInfos); AssertSchedulerControl(predefinedMap, propertyInfos); }
internal async Task Map_Predefined_ChartControl_Configurations(PredefinedMap configuration, Type[] assembliesToLoad, Platform platform, string[] collectionNames) { InitializeMapperService($"{nameof(Map_Predefined_ChartControl_Configurations)}{configuration}", platform); assembliesToLoad.ToObservable().Do(type => Assembly.LoadFile(type.Assembly.Location)).Subscribe(); var modelType = await configuration.MapToModel().ModelInterfaces(); var propertyInfos = modelType.GetProperties(); AssertPredefinedConfigurationsMap(configuration, collectionNames, modelType, propertyInfos); if (configuration == PredefinedMap.ChartControl) { propertyInfos.FirstOrDefault(info => nameof(ChartControl.Diagram) == info.Name).ShouldBeNull(); var propertyInfo = propertyInfos.FirstOrDefault(info => info.Name == $"{nameof(ChartControl.Diagram)}s"); propertyInfo.ShouldNotBeNull(); var type = modelType.Assembly.GetType(typeof(Diagram).ModelTypeName(typeof(ChartControl))); propertyInfo.PropertyType.GetInterfaces().ShouldContain(typeof(IModelList <>).MakeGenericType(type)); } }