public ItemProcessor(IDestMasterRepository destMasterRepository, IItemConverter itemConverter, IItemFactory itemFactory, AppSettings appSettings)
 {
     _destMasterRepository = destMasterRepository;
     _itemConverter        = itemConverter;
     _itemFactory          = itemFactory;
     _appSettings          = appSettings;
 }
Esempio n. 2
0
        public PropSheet(string fileName)
        {
            try
            {
                this.rows = new Dictionary <uint, Prop>();

                uint index = 0;
                Dictionary <string, string> stringRows = SerializerService.DeserializeFile <Dictionary <string, string> >(fileName);
                foreach ((string key, string value) in stringRows)
                {
                    string[] parts = value.Split(';', StringSplitOptions.RemoveEmptyEntries);

                    (ushort modelSet, ushort modelBase, ushort modelVariant) = IItemConverter.SplitString(key);
                    Prop prop = new Prop();
                    prop.Name = parts[0].Trim();

                    if (parts.Length == 2)
                    {
                        prop.Description = parts[1].Trim();
                    }

                    prop.ModelBase    = modelBase;
                    prop.ModelVariant = modelVariant;
                    prop.ModelSet     = modelSet;

                    this.rows.Add(index, prop);

                    index++;
                }
            }
            catch (Exception ex)
            {
                throw new Exception($"Failed to load json data: {fileName}", ex);
            }
        }
 public void SetupTests()
 {
     _view = MockRepository.GenerateMock<IInBoxView>();
     _view.Stub(x => x.List).Return(MockRepository.GenerateMock<IListSelectionChanger>());
     var model = MockRepository.GenerateStub<IItemModel<InBoxItem>>();
     _converter = MockRepository.GenerateMock<IItemConverter>();
     _form = CreateInboxController(model);
 }
 public FormProcessor(ILogger logger, ISourceMasterRepository sourceMasterRepository, AppSettings appSettings, IMetadataProvider metadataProvider,
                      IDestMasterRepository destMasterRepository, IItemConverter itemConverter, IItemFactory itemFactory, SubmitConverter submitConverter,
                      FormAppearanceConverter formAppearanceConverter, SectionAppearanceConverter sectionAppearanceConverter, IReporter conversionReporter)
     : base(destMasterRepository, itemConverter, itemFactory, appSettings)
 {
     _logger = logger;
     _sourceMasterRepository     = sourceMasterRepository;
     _destMasterRepository       = destMasterRepository;
     _appSettings                = appSettings;
     _metadataProvider           = metadataProvider;
     _submitConverter            = submitConverter;
     _formAppearanceConverter    = formAppearanceConverter;
     _sectionAppearanceConverter = sectionAppearanceConverter;
     _conversionReporter         = conversionReporter;
 }
Esempio n. 5
0
 public SubmitConverter(IMetadataProvider metadataProvider, IDestMasterRepository destMasterRepository, IItemConverter itemConverter, IItemFactory itemFactory,
                        IFieldProvider fieldProvider, AppSettings appSettings, IReporter analysisReporter, ILogger logger)
     : base(destMasterRepository, itemConverter, itemFactory, appSettings)
 {
     _destMasterRepository = destMasterRepository;
     _metadataProvider     = metadataProvider;
     _fieldProvider        = fieldProvider;
     _appSettings          = appSettings;
     _analysisReporter     = analysisReporter;
     _logger = logger;
 }
Esempio n. 6
0
 public SectionAppearanceConverter(IMetadataProvider metadataProvider, IDestMasterRepository destMasterRepository, IItemConverter itemConverter, IItemFactory itemFactory, IFieldProvider fieldProvider, AppSettings appSettings)
     : base(destMasterRepository, itemConverter, itemFactory, appSettings)
 {
     _destMasterRepository = destMasterRepository;
     _metadataProvider     = metadataProvider;
     _fieldProvider        = fieldProvider;
     _appSettings          = appSettings;
 }