public PlatformExportImportManager( UserManager <ApplicationUser> userManager , RoleManager <Role> roleManager , IPermissionsRegistrar permissionsProvider , ISettingsManager settingsManager , IDynamicPropertyService dynamicPropertyService , IDynamicPropertySearchService dynamicPropertySearchService , ILocalModuleCatalog moduleCatalog , IDynamicPropertyDictionaryItemsService dynamicPropertyDictionaryItemsService , IDynamicPropertyDictionaryItemsSearchService dynamicPropertyDictionaryItemsSearchService , IUserApiKeyService userApiKeyService , IUserApiKeySearchService userApiKeySearchService) { _dynamicPropertyService = dynamicPropertyService; _userManager = userManager; _roleManager = roleManager; _settingsManager = settingsManager; _moduleCatalog = moduleCatalog; _dynamicPropertyDictionaryItemsService = dynamicPropertyDictionaryItemsService; _dynamicPropertyDictionaryItemsSearchService = dynamicPropertyDictionaryItemsSearchService; _permissionsProvider = permissionsProvider; _dynamicPropertySearchService = dynamicPropertySearchService; _userApiKeyService = userApiKeyService; _userApiKeySearchService = userApiKeySearchService; }
public DynamicPropertiesController(IDynamicPropertyRegistrar dynamicPropertyRegistrar, IDynamicPropertyService dynamicPropertyService, IDynamicPropertySearchService dynamicPropertySearchService, IDynamicPropertyDictionaryItemsService dynamicPropertyDictionaryItemsService, IDynamicPropertyDictionaryItemsSearchService dynamicPropertyDictionaryItemsSearchService) { _dynamicPropertyService = dynamicPropertyService; _dynamicPropertySearchService = dynamicPropertySearchService; _dynamicPropertyDictionaryItemsService = dynamicPropertyDictionaryItemsService; _dynamicPropertyDictionaryItemsSearchService = dynamicPropertyDictionaryItemsSearchService; _dynamicPropertyRegistrar = dynamicPropertyRegistrar; }
public DynamicPropertyValueType(IMediator mediator, IDynamicPropertyDictionaryItemsService dynamicPropertyDictionaryItemsService) { _dynamicPropertyDictionaryItemsService = dynamicPropertyDictionaryItemsService; Field <StringGraphType>("name", "Property name", resolve: context => context.Source.PropertyName); Field <StringGraphType>(nameof(DynamicPropertyObjectValue.ValueType), "Value type", resolve: context => context.Source.ValueType.ToString()); Field <DynamicPropertyValueGraphType>(nameof(DynamicPropertyObjectValue.Value), "Property value", resolve: context => context.Source.Value); FieldAsync <DictionaryItemType>("dictionaryItem", "Associated dictionary item", resolve: async context => { var id = context.Source.ValueId; if (id.IsNullOrEmpty()) { return(null); } var items = await _dynamicPropertyDictionaryItemsService.GetDynamicPropertyDictionaryItemsAsync(new[] { id }); return(items.FirstOrDefault()); }); FieldAsync <DynamicPropertyType>("dynamicProperty", "Associated dynamic property", resolve: async context => { var id = context.Source.PropertyId; if (id.IsNullOrEmpty()) { return(null); } var query = context.GetDynamicPropertiesQuery <GetDynamicPropertyQuery>(); query.IdOrName = id; var response = await mediator.Send(query); return(response.DynamicProperty); }); }
public DynamicPropertyDictionaryItemsSearchService(Func <IPlatformRepository> repositoryFactory, IPlatformMemoryCache memoryCache, IDynamicPropertyDictionaryItemsService dynamicPropertyDictionaryItemsService) { _repositoryFactory = repositoryFactory; _memoryCache = memoryCache; _dynamicPropertyDictionaryItemsService = dynamicPropertyDictionaryItemsService; }