private async Task ProcessClassesAndArrays(GenerateGenericUserInterfaceModel interfaceModel) { foreach (var block in interfaceModel.Interface.Blocks) { if (block.InterfaceType == UserInterfaceType.GenericInterfaceForClass) { var defaultInterface = await GetOrAddDefaultInterfaceFromComputed(block.TypeDisplayFullName); if (defaultInterface == null) { throw new NotImplementedException($"Не могу создать интерфейс для {block.TypeDisplayFullName}"); } block.InnerGenericInterface = defaultInterface.InterfaceModel.Interface; } else if (block.InterfaceType == UserInterfaceType.GenericInterfaceForArray) { var defaultInterface = await GetOrAddDefaultInterfaceFromComputed(block.TypeDisplayFullName[0..^ 2]);
/// <summary> /// Конструктор /// </summary> /// <param name="result"></param> public GenericUserInterfaceModelBuilder(GenerateGenericUserInterfaceModel result) { Result = result ?? throw new NullReferenceException(nameof(result)); }
private static Task ProccessDropDownDatas(GenericUserInterfaceBag bag, GenerateGenericUserInterfaceModel model) { return(ProccessInterfaceModel(bag, model.Interface)); }
/// <summary> /// Конструктор /// </summary> /// <param name="type"></param> /// <param name="valueJson"></param> /// <param name="opts"></param> public GenericUserInterfaceModelBuilder(Type type, string valueJson, GenericInterfaceOptions opts) { Result = CreateFromType(type, valueJson, opts); }
/// <summary> /// Конструктор /// </summary> internal GenericUserInterfaceModelBuilder(GenerateGenericUserInterfaceModel model, GenericUserInterfaceBag bag) : base(model) { Bag = bag; }